Subject: Re: COMPAT_MACH and lwp
To: None <tech-kern@netbsd.org>
From: Emmanuel Dreyfus <manu@netbsd.org>
List: tech-kern
Date: 01/26/2003 20:30:05
> Parent is sleeping, awaiting for the child to be ready, and I have no idea
> where the child is. It is supposed to be runnable, but according to TIME, it
> has nor run.

Ok, I fixed it. The problem was that it's the parent responsability to
make the child lwp runnable. So this code is mandatory after using
newlwp:

        SCHED_LOCK(s);
        mctc.mctc_lwp->l_stat = LSRUN;
        setrunqueue(mctc.mctc_lwp);
        SCHED_UNLOCK(s);
        simple_lock(&p->p_lwplock);
        p->p_nrlwps++;
        simple_unlock(&p->p_lwplock);
        p->p_nrlwps++;

Why newlwp does not do it for us? It could be disabled by a flag if it
is necessary. The current scheme encourage code duplication.

COMPAT_MACH/COMPAT_DARWIN seems fixed wrt to lwp, I beleive we reached
the same level of functionnality we had before SA merge.

-- 
Emmanuel Dreyfus.  
Pas de processeur Intel, pas de logiciels Microsoft:
Des programmes sains dans un ordinateur sain.
manu@netbsd.org