From owner-freebsd-arch@FreeBSD.ORG Thu Jan 1 07:12:53 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 4503416A4CE for ; Thu, 1 Jan 2004 07:12:53 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F15B43D1F; Thu, 1 Jan 2004 07:12:52 -0800 (PST) (envelope-from davidxu@freebsd.org) Received: from freebsd.org (davidxu@localhost [127.0.0.1]) i01FCoFR056628; Thu, 1 Jan 2004 07:12:51 -0800 (PST) (envelope-from davidxu@freebsd.org) Message-ID: <3FF43B93.5060209@freebsd.org> Date: Thu, 01 Jan 2004 23:24:03 +0800 From: David Xu User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.5) Gecko/20031208 Thunderbird/0.3 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Doug Rabson References: <1072537553.1143.19.camel@herring.nlsystems.com> In-Reply-To: <1072537553.1143.19.camel@herring.nlsystems.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit 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:12:53 -0000 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 David Xu