Subject: Re: Final reaper removal patch
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Jaromir Dolecek <jdolecek@NetBSD.org>
List: tech-kern
Date: 02/08/2004 18:42:36
YAMAMOTO Takashi wrote:
> is it ok to commit the following diff for now?

I think this is fine.

Jaromir
 
> YAMAMOTO Takashi
> 
> Index: kern_lwp.c
> ===================================================================
> --- kern_lwp.c	(revision 516)
> +++ kern_lwp.c	(revision 517)
> @@ -596,6 +596,7 @@ lwp_exit2(struct lwp *l)
>  {
>  	struct proc *p;
>  
> +	KERNEL_LOCK(LK_EXCLUSIVE);
>  	/*
>  	 * Free the VM resources we're still holding on to.
>  	 */
> @@ -612,9 +613,11 @@ lwp_exit2(struct lwp *l)
>  		}
>  
>  		pool_put(&lwp_pool, l);
> +		KERNEL_UNLOCK();
>  	} else {
>  		p = l->l_proc;
>  		p->p_nzlwps++;
> +		KERNEL_UNLOCK();
>  		wakeup(&p->p_nlwps);
>  	}
>  }
> 

-- 
Jaromir Dolecek <jdolecek@NetBSD.org>            http://www.NetBSD.cz/
-=- We should be mindful of the potential goal, but as the Buddhist -=-
-=- masters say, ``You may notice during meditation that you        -=-
-=- sometimes levitate or glow.   Do not let this distract you.''   -=-