lkml.org 
[lkml]   [1999]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Thread-private mappings and graphics (was Re: Per-Processor Data
Date
Followup to:  <Pine.LNX.3.96.991214021400.376B-100000@wakko.deltatee.com>
By author: Jason Gunthorpe <jgg@ualberta.ca>
In newsgroup: linux.dev.kernel
>
> I'm not sure if someone mentioned this before but..
>
> It seems to me that in the OS/2 environment this problem was solved by
> sacrificing one of the i386 segment registers to a thread-specific value.
> Each thread stored a thread id of sorts that could be used to quickly
> perform a table lookup and find thread local stuff [it may even have been
> that it was a valid segment, don't remember]. There even existed extended
> compilers (CSet and HighC) that could generate this inlined code
> automatically though some weird pragma.
>
> Obviosly rather Intel specific, but a different sort of solution :>
>

Not really. The use of a segment register is just a way to compensate
for the lack of registers on the i386; on any other CPU you would
typically use a GPR for the glocal data base pointer. The function is the
same: you add the glocal data base pointer to each address; this is an
attribute on the pointer data type.

-hpa


--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."

-
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/

\
 
 \ /
  Last update: 2005-03-22 13:55    [W:0.097 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site