From owner-freebsd-threads@FreeBSD.ORG Sun Aug 17 20:18:53 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 379A937B401; Sun, 17 Aug 2003 20:18:53 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7701443FAF; Sun, 17 Aug 2003 20:18:52 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mail.pcnet.com (8.12.8/8.12.1) with ESMTP id h7I3IpuN002098; Sun, 17 Aug 2003 23:18:51 -0400 (EDT) Date: Sun, 17 Aug 2003 23:18:51 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Marcel Moolenaar In-Reply-To: <20030818003546.GA44401@dhcp42.pn.xcllnt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: David Xu 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 Reply-To: deischen@freebsd.org List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 18 Aug 2003 03:18:53 -0000 On Sun, 17 Aug 2003, Marcel Moolenaar wrote: > On Mon, Aug 18, 2003 at 07:34:21AM +0800, David Xu wrote: > > > > > > > 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. > > > > I can pass mutex_d if gettimeofday does not return -1, but it is strange > > that gettimeofday can return -1 and errno is EFAULT. > > The copyout() is probably failing or we're not restoring the > return registers properly. > > > so line 414 of mutex_d.c is asserted: > > assert (gettimeofday (&tv2, NULL) == 0); > > Yup. That's what I'm seeing too. Hmm, that's not what I see. -- Dan Eischen