cvs commit: src/sys/kern subr_turnstile.c

John Baldwin jhb at
Thu Sep 27 12:29:12 PDT 2007

On Thursday 27 September 2007 02:39:19 pm John Baldwin wrote:
> jhb         2007-09-27 18:39:18 UTC
>   FreeBSD src repository
>   Modified files:        (Branch: RELENG_6)
>     sys/kern             subr_turnstile.c 
>   Log:
>   - Remove some debugging nits in the MFC of rwlocks that looked for cases
>     where a reader blocked on a lock with no owner and just assert that it
>     never happens like HEAD.
>   - Actually set td->td_tsqueue to the sub-queue of a turnstile that a
>     thread is actually enqueued to.  Otherwise, the kernel would always
>     think that threads were on the queue for exclusive (write) waiters
>     (queue 0).  Thus, if the priority of a thread waiting on a read lock
>     was adjusted while it was waiting it could result in corrupting the
>     queue of waiting threads.

Oops, forgot to mention that this should also fix kernel page faults when a 
reader unlocks a rwlock with waiting writer(s).

John Baldwin

More information about the cvs-src mailing list