K 10 svn:author V 8 lstewart K 8 svn:date V 27 2008-11-20T04:04:22.457032Z K 7 svn:log V 806 Fix a bug in kthread_exit() which led to potential deadlock in code that was relying on the documented behaviour in the kthread(9) man page. This brings the wakeup() related behaviour of kthread_exit in 7.x inline with 8.x. I've tested the fix with a simple scenario that was previously deadlocking. A waiting thread waits on a terminating thread by calling mtx_sleep() with the "chan" argument set to the *thread obtained by calling FIRST_THREAD_IN_PROC(*proc_that_will_exit). Without this patch, the waiting thread never gets woken because kthread_exit() calls wakeup() on the *proc. With this patch, the wait thread gets woken and all is good in the world again. For more details, refer to: http://lists.freebsd.org/pipermail/freebsd-arch/2008-November/008688.html Discussed with: attilio@, julian@ END