From owner-freebsd-arch Sat Nov 16 8:49:56 2002 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 C5E0337B401 for ; Sat, 16 Nov 2002 08:49:54 -0800 (PST) Received: from herring.nlsystems.com (mailgate.nlsystems.com [62.49.251.130]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7FBD543E4A for ; Sat, 16 Nov 2002 08:49:53 -0800 (PST) (envelope-from dfr@nlsystems.com) Received: from herring.nlsystems.com (herring.nlsystems.com [10.0.0.2]) by herring.nlsystems.com (8.12.6/8.12.6) with ESMTP id gAGGnoDP097274; Sat, 16 Nov 2002 16:49:50 GMT (envelope-from dfr@nlsystems.com) Content-Type: text/plain; charset="iso-8859-1" From: Doug Rabson To: Daniel Eischen , arch@FreeBSD.ORG Subject: Re: What to do with userland *context() functions Date: Sat, 16 Nov 2002 16:49:50 +0000 User-Agent: KMail/1.4.3 References: <3DD66393.40AFC73@vigrid.com> In-Reply-To: <3DD66393.40AFC73@vigrid.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200211161649.50346.dfr@nlsystems.com> X-Spam-Status: No, hits=-4.2 required=5.0 tests=IN_REP_TO,REFERENCES,SPAM_PHRASE_00_01,USER_AGENT, USER_AGENT_KMAIL version=2.41 Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Saturday 16 November 2002 3:26 pm, Daniel Eischen wrote: > After adding *context() as system calls, we no longer > need the userland versions. But I would like to use > them in libc_r and they might be useful to someone else > writing their own userland threading library. As of > now, we need different variants of them for libpthread, > so they aren't expected to be used there. > > How do folks feel about keeping them in libc, but named > as _getctx, _setctx, _swapctx? They would be similar > to _setjmp/_longjmp which don't save/restore the signal > mask. It'll add a little bloat to libc and they are > only present for i386 and alpha archs. > > I'll have them repo-copied to libc_r if the consensus is > to remove them from libc. I'm not quite sure why libc_r can't use the standard swapcontext system=20 call. Is it something to do with the signal mask? It seems to defeat=20 the object to create a bunch of nice standard functions for low-level=20 thread switching and then not use them. Plus it means we need to=20 maintain two (or three) variations of the same code, which seems wrong. --=20 Doug Rabson=09=09=09=09Mail: dfr@nlsystems.com =09=09=09=09=09Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message