s available
> for localized thread data.
>
> - Matt
>
> Terry Gin wrote:
> >
> > Thanks, Matt.
> >
> > Actually, I did mean thread-local storage, which is a language extension
> > supported by some compilers. These compilers pro
Sorry I never responded (been buried). Unfortunately past the fact that
you can do "thread_specific()" I don't know much about what's available
for localized thread data.
- Matt
Terry Gin wrote:
>
> Thanks, Matt.
>
> Actually, I did mea
Thanks, Matt.
Actually, I did mean thread-local storage, which is a language extension
supported by some compilers. These compilers probably use
thread-specific data to implement thread-local storage.
I can use thread-specific data to accomplish what I want, but it's a
little more &
on both Win32 and HP-UX to Linux.
> MSVC++ supports thread-local storage via the __declspec(thread)
> attribute, and HP-UX's aCC supports it via the __thread attribute. Does
> Linux (g++) have similar mechanism that supports thread-local storage?
>
> Thanks in advance.
>
>
I'm porting an app that currently runs on both Win32 and HP-UX to Linux.
MSVC++ supports thread-local storage via the __declspec(thread)
attribute, and HP-UX's aCC supports it via the __thread attribute. Does
Linux (g++) have similar mechanism that supports thread-local storage?
// or whatever size
to get a pointer to thread local storage. Not only is that as fast as using
a segment override (often faster) but you can do it once for several values.
This is how the kernel does it. The task structures for the kernel live
in the kernel stack this way.
Alan
-
hi friends,
In M$'s windows, there is a mechanism called Thread Local Storage
(TLS),by which
each thread in a multithreaded process allocates storage for
thread-specific data. So,
this type of storage is not shared among threads of a process. M$'s C
compiler includes
a key word