From owner-freebsd-threads@FreeBSD.ORG Thu Jun 19 00:14:23 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 D046B37B401 for ; Thu, 19 Jun 2003 00:14:23 -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 5E40843FCB for ; Thu, 19 Jun 2003 00:14:21 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from user-2ivfk2f.dialup.mindspring.com ([165.247.208.79] helo=mindspring.com) by heron.mail.pas.earthlink.net with asmtp (SSLv3:RC4-MD5:128) (Exim 3.33 #1) id 19Stch-0007md-00; Thu, 19 Jun 2003 00:14:19 -0700 Message-ID: <3EF1628A.380EB45F@mindspring.com> Date: Thu, 19 Jun 2003 00:13:14 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel Eischen References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-ELNK-Trace: b1a02af9316fbb217a47c185c03b154d40683398e744b8a4b3d42763fbf8996744c64234924a6247666fa475841a1c7a350badd9bab72f9c350badd9bab72f9c cc: threads@freebsd.org cc: zander@mail.minion.de cc: Gareth Hughes 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: Thu, 19 Jun 2003 07:14:24 -0000 Daniel Eischen wrote: > 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? 1) No other users of %gs. 2) Thread running at the time of involuntary preemption is the thread that gets resumed on the next quantum, with no regard to thread priority. 3) No one (mostly) does a lot of work in signal handlers. It's not so much that it works on purpose as that it works by serendipity. -- Terry