kern/dsched: Fix a panic at proc exit
authorJoris Giovannangeli <joris@giovannangeli.fr>
Wed, 29 Oct 2014 21:43:02 +0000 (22:43 +0100)
committerJoris Giovannangeli <joris@giovannangeli.fr>
Wed, 29 Oct 2014 21:50:58 +0000 (22:50 +0100)
commit4db1a66d8221d557a0a3e37aa842cf2824e0dfea
tree90ca8633569d2352363e3257ac38eb0f6b02280d
parent37f8326d69c029a74c0b41bd590a4ecccd6153ea
kern/dsched: Fix a panic at proc exit

 * When a proc exit, dsched tries to destroy the thread context.
   But if the thread context is not empty, it needs to wait
   for the thread ios to be drained.

 * add a callback to wakeup the thread when the last queued io is
   completed and resume the in progress destruction.

 * Should fix #2645
sys/kern/kern_dsched.c
sys/sys/dsched.h