cvs commit: src/sys/kern kern_exit.c kern_thread.c

John Baldwin jhb at freebsd.org
Thu Mar 16 03:49:38 UTC 2006


On Tuesday 14 March 2006 06:30 pm, David Xu wrote:
> On Tuesday 14 March 2006 21:25, John Baldwin wrote:
> > On Monday 13 March 2006 11:00 pm, David Xu wrote:
> > > davidxu     2006-03-14 04:00:21 UTC
> > >
> > >   FreeBSD src repository
> > >
> > >   Modified files:
> > >     sys/kern             kern_exit.c kern_thread.c
> > >   Log:
> > >   1. Count last time slice, this intends to fix
> > >      "calcru: runtime went backwards" bug for threaded process.
> > >   2. Add comment about possible logical problem with scheduler.
> > >
> > >   MFC after: 3 days
> >
> > Great!  Thanks for testing this!
>
> I was very upset, and forgot to put your name in the log, apologize.
> Note that because the thread has detached itself from scheduler,
> calling PROC_UNLOCK in theory is not safe, so I have moved
> up this patch code a bit.

Ok.  I think the PROC_UNLOCK might be ok in practice though because
we are in a critical section, so we won't preempt when we unlock
the mutex and will keep executing until we get to the cpu_throw.

-- 
John Baldwin <jhb at FreeBSD.org>  <><  http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve"  =  http://www.FreeBSD.org


More information about the cvs-src mailing list