From owner-freebsd-arch@FreeBSD.ORG Thu Jan 1 07:56:52 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A24DD16A4CE; Thu, 1 Jan 2004 07:56:52 -0800 (PST) Received: from herring.nlsystems.com (mailgate.nlsystems.com [80.177.232.242]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0744443D55; Thu, 1 Jan 2004 07:56:51 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from [10.0.0.2] (herring.nlsystems.com [10.0.0.2]) i01FudlM077417; Thu, 1 Jan 2004 15:56:39 GMT (envelope-from dfr@nlsystems.com) From: Doug Rabson To: David Xu In-Reply-To: <3FF43B93.5060209@freebsd.org> References: <1072537553.1143.19.camel@herring.nlsystems.com> <3FF43B93.5060209@freebsd.org> Content-Type: text/plain Message-Id: <1072972599.3233.26.camel@herring.nlsystems.com> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Thu, 01 Jan 2004 15:56:39 +0000 Content-Transfer-Encoding: 7bit X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.60 X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on herring.nlsystems.com cc: arch@freebsd.org Subject: Re: sigaltstack with threads X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jan 2004 15:56:52 -0000 On Thu, 2004-01-01 at 15:24, David Xu wrote: > Doug Rabson wrote: > > I think that if its supported at all in threaded programs, it must be > > per-thread state otherwise you can't prevent two different threads > > colliding on the same signal stack. I can't quite see how this maps to > > KSE/KSEG since I only have the most hazy model of that stuff in my head > > right now. > > > > Anyway, I've worked around things by not setting SA_ONSTACK for the > > handlers that I want to run on the thread stack. > > > > > I have worked out a patch to support per-thread sigaltstack() state, > in most cases, it is just a literally replacement. > > http://people.freebsd.org/~davidxu/kse/kern_sigaltstack.diffs Looks fine to me.