Re: Thread-private mappings and graphics (was Re: Per-Processor Data

Manfred Spraul (manfreds@colorfullife.com)
Tue, 14 Dec 1999 10:26:21 +0100


Jon Leech wrote:
>
> On Mon, Dec 13, 1999 at 10:31:49PM -0800, Linus Torvalds wrote:
> > You can have thread-private _pointers_. Just have different mappings of
> > the same hardware context if you have to, and just have different
> > pointers to it in different threads.
>
> This doesn't address the problem. First, the threads need to refer
> to *different* graphics contexts. Second, the API requires that these
> contexts be identified by some thread-specific mechanism available to
> the graphics library, not by explicit stack pointers in the application
> - whether that mechanism is private mappings or tarot cards matters not,
> so long as it's extremely fast.
>
Could you check how the NT version of OpenGL is implemented? AFAIK WinNT
has no thread-private mappings.

The OS has TlsAlloc(), .. functions that allows you to access thread
specific pointers. On i386, it's implemented with the FS segment
register, I don't know what they did on Alpha/PPC.

--
	Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/