From owner-freebsd-arch Mon Nov 22 20:13:27 1999 Delivered-To: freebsd-arch@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id 6CDDE14A0E for ; Mon, 22 Nov 1999 20:13:23 -0800 (PST) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.3/8.9.3) with ESMTP id FAA00405 for ; Tue, 23 Nov 1999 05:13:15 +0100 (CET) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id FAA24310 for freebsd-arch@freebsd.org; Tue, 23 Nov 1999 05:13:15 +0100 (MET) Received: from picnic.mat.net (picnic.mat.net [206.246.122.133]) by hub.freebsd.org (Postfix) with ESMTP id B5E2614A0E for ; Mon, 22 Nov 1999 20:12:47 -0800 (PST) (envelope-from chuckr@picnic.mat.net) Received: from localhost (chuckr@localhost [127.0.0.1]) by picnic.mat.net (8.9.3/8.9.3) with ESMTP id XAA70655; Mon, 22 Nov 1999 23:12:12 -0500 (EST) (envelope-from chuckr@picnic.mat.net) Date: Mon, 22 Nov 1999 23:12:12 -0500 (EST) From: Chuck Robey To: Julian Elischer Cc: Nate Williams , "Daniel M. Eischen" , freebsd-arch@freebsd.org Subject: Re: Threads In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Mon, 22 Nov 1999, Julian Elischer wrote: > I think the usual errno hack is just fine.. > we've already cleaned out other occurances of errno from a lot of code. > > #define errno (*threadspecific->errnum) > or > #define errno (errnum[thread_ID]) > > Actually there is no reason errno can't be on your local stack, in th > einitial frame, as long as you have a way to reference it. OK. The question came to my mind when reading the Sun whitepaper, for thread-specific static storage. They did it via the compiler, and seeing as that would be hard for us, I was curious how we'd do it. I was wondering if it might be done via the thread context block. In light of the fact that new threads are dynamically created, I'm not too sure how you'd do your second suggestion above, but the first one seems easily doable. I want to ask a couple more questions, about the scheduler, procs and KSE's. For general questions, would maybe another list be better? ---------------------------------------------------------------------------- Chuck Robey | Interests include C programming, Electronics, 213 Lakeside Dr. Apt. T-1 | communications, and signal processing. Greenbelt, MD 20770 | I run picnic.mat.net: FreeBSD-current(i386) and (301) 220-2114 | jaunt.mat.net : FreeBSD-current(Alpha) ---------------------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message