From owner-freebsd-threads@FreeBSD.ORG Sun Aug 17 16:12:48 2003 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 373F437B401; Sun, 17 Aug 2003 16:12:48 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id F3CF443F3F; Sun, 17 Aug 2003 16:12:46 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp42.pn.xcllnt.net (dhcp42.pn.xcllnt.net [192.168.4.242]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h7HNCkwO099046; Sun, 17 Aug 2003 16:12:46 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp42.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp42.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h7HNCkR6019455; Sun, 17 Aug 2003 16:12:46 -0700 (PDT) (envelope-from marcel@dhcp42.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp42.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h7HNCkIx019454; Sun, 17 Aug 2003 16:12:46 -0700 (PDT) (envelope-from marcel) Date: Sun, 17 Aug 2003 16:12:46 -0700 From: Marcel Moolenaar To: David Xu Message-ID: <20030817231246.GA17207@dhcp42.pn.xcllnt.net> References: <20030817185015.GB928@dhcp42.pn.xcllnt.net> <200308180647.52744.davidxu@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200308180647.52744.davidxu@FreeBSD.org> User-Agent: Mutt/1.5.4i cc: threads@FreeBSD.org Subject: Re: First draft: rewrite of {get|set|swap}context(3) X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Aug 2003 23:12:48 -0000 On Mon, Aug 18, 2003 at 06:47:52AM +0800, David Xu wrote: > > Then doesn't signal context in signal handler have a UCF_SIGMASK ? Yes. > void (*__sa_sigaction)(int, struct __siginfo *, ucontext_t *ucp); > the context *ucp should have UCF_SIGMASK now. We never define uc_flags currently. We only copyout() uc_sigmask and uc_mcontext. Hence, the uc_flags field is garbage. As is the uc_stack field. > I think it should be UCF_NOSIGMASK. But for libkse, we really needn't > this kind of hack, because M:N thread in kernel always masks all signals, > you can always SIGFILLSET(&uc.uc_sigmask) before call set_context. I tried this, but it didn't fix mutex_d. -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net