git: kernel - Fix race in multi-LWP exit

看板DFBSD_commit作者時間14年前 (2011/12/28 02:04), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
commit 2af9d75dac792301c2672459217b4b91c60a1d1f Author: Matthew Dillon <dillon@apollo.backplane.com> Date: Mon Nov 28 22:13:38 2011 -0800 kernel - Fix race in multi-LWP exit * Fix a very small race condition after TDF_EXITING could get set where a LWPs thread could get destroyed by another cpu (reaping it) before the thread actually finished exiting. * Clean up a case where we were improperly testing TDF_RUNQ which could result in unnecessary 1-tick delays in exit reaping. * Beef up the assertion when TDF_EXITING is found to be set that both TDF_RUNQ and TDF_TSLEEPQ are not set (before it was just checking TDF_TSLEEPQ). * Clean up reaplwp(). * Remove lwkt_wait_free() * lwkt_free_thread() now waits for td_refs to drop to 0 before freeing the thread. Summary of changes: sys/kern/kern_exit.c | 62 +++++++++++++++++++++++++++++++---------------- sys/kern/lwkt_thread.c | 31 +++++++++++++----------- 2 files changed, 58 insertions(+), 35 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/2af9d75dac792301c2672459217b4b91c60a1d1f -- DragonFly BSD source repository
文章代碼(AID): #1E-WYkpG (DFBSD_commit)