Original Post
If I create threads using clone() with the CLONE_THREAD flag, can I assume that any thread local storage the glibc runtime uses, as well as anything I have declared with __thread, is initialized properly? In Windows, _beginthreadex provides for this. If it's not the case with clone(), how do I go about doing it?
[Edit:] __thread doesn't seem to be working, as I get the same address of a static __thread variable in a function called from both threads... So how do I get __thread working when/after using clone()?
[Edited by - Prune on January 5, 2011 10:13:56 PM]
[Edit:] __thread doesn't seem to be working, as I get the same address of a static __thread variable in a function called from both threads... So how do I get __thread working when/after using clone()?
[Edited by - Prune on January 5, 2011 10:13:56 PM]