]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Commit 2/14 of sched_lock decomposition.
authorJeff Roberson <jeff@FreeBSD.org>
Mon, 4 Jun 2007 23:50:56 +0000 (23:50 +0000)
committerJeff Roberson <jeff@FreeBSD.org>
Mon, 4 Jun 2007 23:50:56 +0000 (23:50 +0000)
commitd72e80f09a2a3ef3e0c1a984dd5f64038f3d9f67
treea5bf0e5812452f39f88440ebc8ff94193caf026c
parent7b20fb19fb3562a8539ad590a20fc2a4b6c956cb
Commit 2/14 of sched_lock decomposition.
 - Adapt sleepqueues to the new thread_lock() mechanism.
 - Delay assigning the sleep queue spinlock as the thread lock until after
   we've checked for signals.  It is illegal for a thread to return in
   mi_switch() with any lock assigned to td_lock other than the scheduler
   locks.
 - Change sleepq_catch_signals() to do the switch if necessary to simplify
   the callers.
 - Simplify timeout handling now that locking a sleeping thread has the
   side-effect of locking the sleepqueue.  Some previous races are no
   longer possible.

Tested by:      kris, current@
Tested on:      i386, amd64, ULE, 4BSD, libthr, libkse, PREEMPTION, etc.
Discussed with: kris, attilio, kmacy, jhb, julian, bde (small parts each)
sys/kern/kern_condvar.c
sys/kern/kern_synch.c
sys/kern/subr_sleepqueue.c