Subject: Re: fork1 and new stack
To: None <>
From: Emmanuel Dreyfus <>
List: tech-kern
Date: 04/26/2002 19:35:26
> Where's the bit where you allocate and map in the new stack?

Just a few lines later:

        bzero(&vmc, sizeof(vmc));
        vmc.ev_addr = trunc_page(child_stack_addr - child_stack_size);
        vmc.ev_len = round_page(child_stack_size);
        vmc.ev_prot = UVM_PROT_RWX;
        vmc.ev_proc = vmcmd_map_zero;
        error = (*vmc.ev_proc)(p, &vmc);

Another problem:
I assumed that the child will not be scheduled until the parent returns
to userland, and thus that I can setup the child after calling fork1().
Is it true on a SMP system?

Emmanuel Dreyfus.