From owner-freebsd-threads@FreeBSD.ORG Wed Jun 18 12:51:14 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 4651637B401 for ; Wed, 18 Jun 2003 12:51:14 -0700 (PDT) Received: from mail.pcnet.com (mail.pcnet.com [204.213.232.4]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8F0B843FB1 for ; Wed, 18 Jun 2003 12:51:13 -0700 (PDT) (envelope-from eischen@vigrid.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 h5IJpCXh003462; Wed, 18 Jun 2003 15:51:12 -0400 (EDT) Date: Wed, 18 Jun 2003 15:51:12 -0400 (EDT) From: Daniel Eischen X-Sender: eischen@pcnet5.pcnet.com To: Andy Ritger In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: threads@freebsd.org cc: zander@mail.minion.de cc: Gareth Hughes 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: Wed, 18 Jun 2003 19:51:14 -0000 On Sat, 14 Jun 2003, Andy Ritger wrote: > The current NVIDIA FreeBSD driver only supports one threading library > on FreeBSD for thread-safe, multi-threaded OpenGL applications: the > FreeBSD port of linux-threads. The NVIDIA FreeBSD OpenGL driver uses > both the i386_set_ldt system call and %gs to support high performance > native OpenGL applications. One question. How does using %gs work in libc_r? Thread switches in libc_r use setjmp()/longjmp() neither of which save and restore %gs. If OpenGL sets %gs, libc_r will not change it when threads are switched. Is NVIDIA's OpenGL suppose to be thread-safe for libc_r? I don't see how it can be. What am I missing? -- Dan Eischen