Re: [Hampshire] Thread-local storage:anyone got anypointers?

Top Page

Reply to this message
Author: Simon Capstick
Date:  
To: lug, Hampshire LUG Discussion List
CC: 
Subject: Re: [Hampshire] Thread-local storage:anyone got anypointers?
Vic wrote:
> Hi All.
>
> I've got some breakage in a chroot I'm using; I've got an array defined as :
>
> static __pthread unsigned short foo[3];
>
> When I try to memcpy to it, I get a segfault.
>
> Removing the __pthread qualifier makes it work (albeit probably not as the
> author intended!)
>
> Can anyone point me at stuff I should be reading to sort this out? I
> don't really understand what the qualifier is trying to do...
>
> Thanks!
>
> Vic.
>
>


I only briefly used pthreads years ago but never remembered using
'__pthread'. Is it something specific to your code (C or C++?), or in
the pthread library? I assume it specifies thread-local storage as per
the subject?

Simon C.