Re: Thread-local storage issue

2011-09-15 Thread Kostik Belousov
On Thu, Sep 15, 2011 at 10:50:47AM +0800, Thinker K.F. Li wrote: > Hi Guys, > > I was in trouble for an issue of TLS implementation of FreeBSD. It is > an issue of ld-elf.so actually. If I have a thread-local variable in > program, the value of the variable is not consistent after an > dlopen().

Thread-local storage issue

2011-09-14 Thread Thinker K.F. Li
Hi Guys, I was in trouble for an issue of TLS implementation of FreeBSD. It is an issue of ld-elf.so actually. If I have a thread-local variable in program, the value of the variable is not consistent after an dlopen(). For example, __thread int var = 50; void modify() { var = 100; } vo