From owner-svn-src-head@FreeBSD.ORG Fri Jul 25 20:21:03 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 896F03FE; Fri, 25 Jul 2014 20:21:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76CC72993; Fri, 25 Jul 2014 20:21:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s6PKL3nR049683; Fri, 25 Jul 2014 20:21:03 GMT (envelope-from deischen@svn.freebsd.org) Received: (from deischen@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s6PKL3A8049682; Fri, 25 Jul 2014 20:21:03 GMT (envelope-from deischen@svn.freebsd.org) Message-Id: <201407252021.s6PKL3A8049682@svn.freebsd.org> From: Daniel Eischen Date: Fri, 25 Jul 2014 20:21:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269095 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Jul 2014 20:21:03 -0000 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++; }