Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Jul 2014 20:21:03 +0000 (UTC)
From:      Daniel Eischen <deischen@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r269095 - head/sys/kern
Message-ID:  <201407252021.s6PKL3A8049682@svn.freebsd.org>

index | next in thread | raw e-mail

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++;
 }
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201407252021.s6PKL3A8049682>