summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_thread.c
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-01-22 11:12:42 +0000
committerhselasky <hselasky@FreeBSD.org>2015-01-22 11:12:42 +0000
commitc0aba3b50d494dc9fefa1cd1304481521fa05a36 (patch)
tree499d9197fe4fbf2671c76f17e92abf2f0cf51d05 /sys/kern/kern_thread.c
parent8925dffab199f6ca4955328774e9fa6d39e9f0c8 (diff)
downloadFreeBSD-src-c0aba3b50d494dc9fefa1cd1304481521fa05a36.zip
FreeBSD-src-c0aba3b50d494dc9fefa1cd1304481521fa05a36.tar.gz
Revert for r277213:
FreeBSD developers need more time to review patches in the surrounding areas like the TCP stack which are using MPSAFE callouts to restore distribution of callouts on multiple CPUs. Bump the __FreeBSD_version instead of reverting it. Suggested by: kmacy, adrian, glebius and kib Differential Revision: https://reviews.freebsd.org/D1438
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r--sys/kern/kern_thread.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c
index b1e1a12..2d0b0d2 100644
--- a/sys/kern/kern_thread.c
+++ b/sys/kern/kern_thread.c
@@ -149,9 +149,6 @@ thread_ctor(void *mem, int size, void *arg, int flags)
audit_thread_alloc(td);
#endif
umtx_thread_alloc(td);
-
- mtx_init(&td->td_slpmutex, "td_slpmutex", NULL, MTX_SPIN);
- callout_init_mtx(&td->td_slpcallout, &td->td_slpmutex, 0);
return (0);
}
@@ -165,10 +162,6 @@ thread_dtor(void *mem, int size, void *arg)
td = (struct thread *)mem;
- /* make sure to drain any use of the "td->td_slpcallout" */
- callout_drain(&td->td_slpcallout);
- mtx_destroy(&td->td_slpmutex);
-
#ifdef INVARIANTS
/* Verify that this thread is in a safe state to free. */
switch (td->td_state) {
@@ -551,6 +544,7 @@ thread_link(struct thread *td, struct proc *p)
LIST_INIT(&td->td_lprof[0]);
LIST_INIT(&td->td_lprof[1]);
sigqueue_init(&td->td_sigqueue, p);
+ callout_init(&td->td_slpcallout, CALLOUT_MPSAFE);
TAILQ_INSERT_TAIL(&p->p_threads, td, td_plist);
p->p_numthreads++;
}
OpenPOWER on IntegriCloud