From owner-freebsd-current Thu Sep 18 10:03:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA19613 for current-outgoing; Thu, 18 Sep 1997 10:03:28 -0700 (PDT) Received: from usr03.primenet.com (tlambert@usr03.primenet.com [206.165.6.203]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA19607 for ; Thu, 18 Sep 1997 10:03:25 -0700 (PDT) Received: (from tlambert@localhost) by usr03.primenet.com (8.8.5/8.8.5) id KAA20721; Thu, 18 Sep 1997 10:02:58 -0700 (MST) From: Terry Lambert Message-Id: <199709181702.KAA20721@usr03.primenet.com> Subject: Re: Thread safe libc To: jb@cimlogic.com.au (John Birrell) Date: Thu, 18 Sep 1997 17:02:57 +0000 (GMT) Cc: ianh@saturn-tech.com, jb@cimlogic.com.au, freebsd-current@FreeBSD.ORG In-Reply-To: <199709182309.XAA08877@freebsd1.cimlogic.com.au> from "John Birrell" at Sep 18, 97 11:09:29 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Like you, I prefer that the replacements for the statics be allocated > with thread specific data, then they call the appropriate _r function. > This allows the code to behave within each thread as though that thread > were the only one. > > I don't think we should worry too much about how the replacements for > the statics behave *between* threads, because a threaded program > should really be using the _r functions. This was the rationale Microsoft gave for not supporting "Free Threading" until VC++ 4.2g, when they introduced the concept of Marshalling TSD (they call it TLS) between threads in nominally the same address space. I truly believe that this is the slippery slope. Unless the design issues are considered up front, we will end up with another historical crock, like library functions which return pointers to static data, or family specific network address manipulation routines, or VFS layers that make VM and other kernel specific calls, or TERMIOS tty revoke handling, or POSIX, etc.. Bogosities unfortunately abound. Regards, Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.