Author: deischen
Date: Fri Jul 25 20:21:02 2014
New Revision: 269095
URL: http://svnweb.freebsd.org/changeset/base/269095
Log:
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.
Modified:
head/sys/kern/kern_thread.c
Modified: head/sys/kern/kern_thread.c
==============================================================================
--- head/sys/kern/kern_thread.c Fri Jul 25 20:18:35 2014 (r269094)
+++ head/sys/kern/kern_thread.c Fri Jul 25 20:21:02 2014 (r269095)
@@ -546,7 +546,7 @@ thread_link(struct thread *td, struct pr
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++;
}
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"