Thread Specific Memory

Thread Specific Memory

Post by David Mino » Thu, 22 Jun 2000 04:00:00



Does thread specific memory provide protection for the blocks pointed to
by keyed variables, or are only the keyed variables themselves safe?  I
suspect the latter but it's not mentioned in any of the documentations.

David Minor
Orbotech

 
 
 

Thread Specific Memory

Post by Kaz Kylhe » Thu, 22 Jun 2000 04:00:00



>Does thread specific memory provide protection for the blocks pointed to
>by keyed variables, or are only the keyed variables themselves safe?  I

No, only the void * values set with pthread_setspecific are squirreled away
into a hidden store managed by the threading library.  What they point to, if
anything, is in your control. Tranferring a pointer into a thread slot has no
effect on the object that pointer refers to.

--
#exclude <windows.h>