From owner-freebsd-threads@FreeBSD.ORG Mon Jun 16 22:56:39 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 6914937B401 for ; Mon, 16 Jun 2003 22:56:39 -0700 (PDT) Received: from heron.mail.pas.earthlink.net (heron.mail.pas.earthlink.net [207.217.120.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8565F43FBF for ; Mon, 16 Jun 2003 22:56:38 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2injaq3.dialup.mindspring.com ([165.121.171.67] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19S9SM-0002jG-00; Mon, 16 Jun 2003 22:56:35 -0700 Message-ID: <3EEEAD50.C374C068@mindspring.com> Date: Mon, 16 Jun 2003 22:55:28 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Gareth Hughes References: <2D32959E172B8F4D9B02F68266BE421401A6D7DF@mail-sc-3.nvidia.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4f75b8175ffdaf6a02d8f6eadf9515152387f7b89c61deb1d350badd9bab72f9c350badd9bab72f9c cc: threads@freebsd.org cc: zander@mail.minion.de cc: 'Julian Elischer' cc: Andy Ritger cc: Daniel Eischen Subject: Re: NVIDIA and TLS 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: Tue, 17 Jun 2003 05:56:39 -0000 Gareth Hughes wrote: > On Mon, 16 Jun 2003, Julian Elischer wrote: > > > > can wine use OpenGL? > > > > Doesn't look like a clash to me. :-) > > I don't understand your point here... His point is that you can feel free to use %fs, even though WINE uses %fs, so long as you do not use WINE and OpenGL in the same program. In other words, the argument that you can't use %fs because WINE does only holds water if you use OpenGL to implement WINE, or WINE to implement OpenGL. Otherwise, there's no conflict. > Currently, given the performance requirements of OpenGL, our drivers > are one of the first users of the new ELF TLS implementation on Linux, > outside of libc itself. Given the fact that this is a general solution > to a common problem, I strongly urge you to take it into consideration > when working on your threading libraries. This is problematic. It constrains the implementation to a specific architecture. The 1:1 mapping of threads in Linux and Solaris are basically a result of "N:M threads are hard to get right; let's just implement 1:1, and go shopping!". Likewise, until we know that this standard is not one of the areas SCO is claiming Linux stole from SCO, it's going to be risky to just follow Linux's lead (on anything!) for a while. > There are only going to be > more users of __thread variables as time goes on -- you can imagine > that many multithreaded user-space server applications will start using > this soon, instead of the clunky pthread TLS interface. It's "clunky" for a reason: to discourage people from writing "apartment" or "rental" model threaded application, instead of "free threaded" applications, which are safely reentrant. We can make it less expensive to use (I'm positive!), but to make it less "clunky" would just encourage evil developers to use it. To paraphrase a wise man: people a lot smarter than you or I designed the POSIX thread local storage API the way it is for a reason... ;^). -- Terry