From owner-freebsd-threads@FreeBSD.ORG Mon Jun 16 15:28:38 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 B127B37B401 for ; Mon, 16 Jun 2003 15:28:38 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 122D643FAF for ; Mon, 16 Jun 2003 15:28:36 -0700 (PDT) (envelope-from eischen@pcnet.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 h5GMSVXh013736; Mon, 16 Jun 2003 18:28:32 -0400 (EDT) Date: Mon, 16 Jun 2003 18:28:31 -0400 (EDT) From: Daniel Eischen To: Gareth Hughes In-Reply-To: <2D32959E172B8F4D9B02F68266BE421401A6D7D1@mail-sc-3.nvidia.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: zander@mail.minion.de cc: 'Julian Elischer' cc: Andy Ritger 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: Mon, 16 Jun 2003 22:28:39 -0000 On Mon, 16 Jun 2003, Gareth Hughes wrote: > On Mon, 16 Jun 2003, Julian Elischer wrote: > > > > It wouldn't take much for us to give you a "application specific > > pointer" in the memory block that is pointed to by %gs. > > > > This would allow you to find your data with a single dereference > > for the N:N threads library.. > > > > %gs ----->[threadsystem-thread-specific-data] > > [ stuff ] > > [ ap-specific pointe ]---->[ your data ] > > [ ] > > > > BUT > > that would only work for the 1:1 threading library > > What's wrong with: > > %gs ----->[threadsystem-thread-specific-data ] > [ stuff ] > [libGL stuff (fixed size, known offset)] %gs is for the KSE in libkse. Multiple threads can run in the same KSE. > Or, better yet, to make sure no problems arise when you change the internals > of your data structures: > > %gs ----->[libGL stuff (16 words, say) ] > [threadsystem-thread-specific-data] > [ stuff ] > > You reserve the first 16 words of your thread data structure for us, and > we're done. At least when this library is being used. Again, %gs isn't per-thread; it's per-KSE. Plus, we're reserving TLS for one vendor/library. What happens when someone else comes along and wants the same thing? I'd much rather see someone push for a new OpenGL spec with better interfaces/APIs. -- Dan Eischen