From owner-freebsd-threads@FreeBSD.ORG Thu Jun 19 22:08: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 0028937B401; Thu, 19 Jun 2003 22:08:52 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id DCA7F43FE3; Thu, 19 Jun 2003 22:08:51 -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 h5K58kXh000586; Fri, 20 Jun 2003 01:08:46 -0400 (EDT) Date: Fri, 20 Jun 2003 01:08:46 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Marcel Moolenaar In-Reply-To: <20030620041234.GA28472@dhcp01.pn.xcllnt.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: davidxu@freebsd.org cc: Julian Elischer Subject: Re: Implementing TLS: step 1 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: Fri, 20 Jun 2003 05:08:53 -0000 On Thu, 19 Jun 2003, Marcel Moolenaar wrote: > On Thu, Jun 19, 2003 at 11:57:04PM -0400, Daniel Eischen wrote: > > > > I'm not too sure about the kernel code. If you have KSEs > > working for libthr, then I assume there is very little extra > > kernel code needed. You do need to have get_mcontext() and > > set_mcontext() implemented in machdep.c, though. It looks > > like you do (although nothing is done with clear_ret in > > get_mcontext()). > > Yes, {g|s}et_mcontext() are implemented, as is makecontext(3). > > We cannot do anything with clear_ret, because it's based on > assumptions that don't hold in ia64. How do return values from syscalls get passed back? > BTW: there's no race that can't be plugged if TP doesn't point > to the mailbox. All we need is an atomic compare-exchange and > a retry loop... Ok, the only problem might be something being deallocated out from under you. For instance, a KSE goes away (gets deallocated) while your thread is continued on another KSE and you are still dereferencing something that may no longer be valid. -- Dan Eischen