summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authordavidxu <davidxu@FreeBSD.org>2003-09-03 00:21:10 +0000
committerdavidxu <davidxu@FreeBSD.org>2003-09-03 00:21:10 +0000
commitf61d4432c4a66d25b46d56aa5e9b599ff7444ae3 (patch)
tree52f41db0278cc4db4c676de74965eee043d02af1 /lib
parent4d1e58a1874d0db47d047ed9a1e8696e0d81839e (diff)
downloadFreeBSD-src-f61d4432c4a66d25b46d56aa5e9b599ff7444ae3.zip
FreeBSD-src-f61d4432c4a66d25b46d56aa5e9b599ff7444ae3.tar.gz
Move kse_wakeup_multi call to just before KSE_SCHED_UNLOCK.
Tested on: SMP
Diffstat (limited to 'lib')
-rw-r--r--lib/libkse/thread/thr_kern.c6
-rw-r--r--lib/libpthread/thread/thr_kern.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/lib/libkse/thread/thr_kern.c b/lib/libkse/thread/thr_kern.c
index d7e28ba..f9a17a5 100644
--- a/lib/libkse/thread/thr_kern.c
+++ b/lib/libkse/thread/thr_kern.c
@@ -1039,8 +1039,6 @@ kse_sched_multi(struct kse_mailbox *kmbx)
kse_switchout_thread(curkse, curthread);
curkse->k_curthread = NULL;
- kse_wakeup_multi(curkse);
-
#ifdef DEBUG_THREAD_KERN
dump_queues(curkse);
#endif
@@ -1071,6 +1069,7 @@ kse_sched_multi(struct kse_mailbox *kmbx)
* created thread would be assigned to us (the initial
* kse[g]).
*/
+ kse_wakeup_multi(curkse);
KSE_SCHED_UNLOCK(curkse, curkse->k_kseg);
kse_fini(curkse);
/* never returns */
@@ -1106,8 +1105,6 @@ kse_sched_multi(struct kse_mailbox *kmbx)
curframe = curthread->curframe;
curthread->curframe = NULL;
- kse_wakeup_multi(curkse);
-
/*
* The thread's current signal frame will only be NULL if it
* is being resumed after being blocked in the kernel. In
@@ -1130,6 +1127,7 @@ kse_sched_multi(struct kse_mailbox *kmbx)
(__sighandler_t *)thr_resume_wrapper);
}
#endif
+ kse_wakeup_multi(curkse);
/*
* Continue the thread at its current frame:
*/
diff --git a/lib/libpthread/thread/thr_kern.c b/lib/libpthread/thread/thr_kern.c
index d7e28ba..f9a17a5 100644
--- a/lib/libpthread/thread/thr_kern.c
+++ b/lib/libpthread/thread/thr_kern.c
@@ -1039,8 +1039,6 @@ kse_sched_multi(struct kse_mailbox *kmbx)
kse_switchout_thread(curkse, curthread);
curkse->k_curthread = NULL;
- kse_wakeup_multi(curkse);
-
#ifdef DEBUG_THREAD_KERN
dump_queues(curkse);
#endif
@@ -1071,6 +1069,7 @@ kse_sched_multi(struct kse_mailbox *kmbx)
* created thread would be assigned to us (the initial
* kse[g]).
*/
+ kse_wakeup_multi(curkse);
KSE_SCHED_UNLOCK(curkse, curkse->k_kseg);
kse_fini(curkse);
/* never returns */
@@ -1106,8 +1105,6 @@ kse_sched_multi(struct kse_mailbox *kmbx)
curframe = curthread->curframe;
curthread->curframe = NULL;
- kse_wakeup_multi(curkse);
-
/*
* The thread's current signal frame will only be NULL if it
* is being resumed after being blocked in the kernel. In
@@ -1130,6 +1127,7 @@ kse_sched_multi(struct kse_mailbox *kmbx)
(__sighandler_t *)thr_resume_wrapper);
}
#endif
+ kse_wakeup_multi(curkse);
/*
* Continue the thread at its current frame:
*/
OpenPOWER on IntegriCloud