diff options
author | deischen <deischen@FreeBSD.org> | 2014-07-25 20:21:02 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2014-07-25 20:21:02 +0000 |
commit | d195860b081b2de18bc49a8a58a9468202964f39 (patch) | |
tree | fcea78c02865a48799ae1c4830c97265efeac1fc /sys/kern/kern_thread.c | |
parent | c1611aec98651bd3730121085a1f36d523e64ba4 (diff) | |
download | FreeBSD-src-d195860b081b2de18bc49a8a58a9468202964f39.zip FreeBSD-src-d195860b081b2de18bc49a8a58a9468202964f39.tar.gz |
Insert new threads at the end of the thread list in the process
instead of at the beginning. This allows an intra process signal
to be sent to the oldest thread with the signal unmasked - which,
if it still exists, is the main thread. This mimics behavior
found in Linux and Solaris.
Diffstat (limited to 'sys/kern/kern_thread.c')
-rw-r--r-- | sys/kern/kern_thread.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 3f95371..05b07ff 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -546,7 +546,7 @@ thread_link(struct thread *td, struct proc *p) LIST_INIT(&td->td_lprof[1]); sigqueue_init(&td->td_sigqueue, p); callout_init(&td->td_slpcallout, CALLOUT_MPSAFE); - TAILQ_INSERT_HEAD(&p->p_threads, td, td_plist); + TAILQ_INSERT_TAIL(&p->p_threads, td, td_plist); p->p_numthreads++; } |