changing in struct proc cause minix freeze

177 views Asked by At

in minix 3.1.2a ,i added an attribute "hash" at the end of the struct proc

struct proc{
.
.
int p_endpoint;     /* endpoint number, generation-aware */

#if DEBUG_SCHED_CHECK
  int p_ready, p_found;
#endif

*int hash;*
}

then ,in main.c in main() i initialized it :

for (rp = BEG_PROC_ADDR, i = -NR_TASKS; rp < END_PROC_ADDR; ++rp, ++i) {
    rp->p_rts_flags = SLOT_FREE;        /* initialize free slot */
    rp->p_nr = i;               /* proc number from ptr */

    rp->p_endpoint = _ENDPOINT(0, rp->p_nr); /* generation no. 0 */

        (pproc_addr + NR_TASKS)[i] = rp;        /* proc ptr from number */
        rp->hash=1;
  }

and so rebuild with no problem,

now in proc.c,in pick_proc() ,if i try to write code that set the "hash" value like:

if(hash==1)
hash=0;

now,i tried all compiling options

make new world
make fresh install
make clean hdboot
make image

but the problem still occured when i reboot, it freeze,as shown :

enter image description here

but if remove the line

hash=0;

it works fine

,so please any help i'll be appreciated

0

There are 0 answers