Gilles Chanteperdrix wrote: > Jan Kiszka wrote: >> Ack. There are rt_printf (rtdk) and the task-self services of vxworks, >> vrtx and native skins. So if I get an OK for the proposal, I'll convert >> the rest, too. > > And I really do not understand how the keys can be chosen at > compilation-time, especially in the situation where multiple libraries > allocate __thread objects separately: how does the compiler know which > key to give for each library ?
The keys are known at linking time when a) their context is module-local and b) their TLS storage can be appended to main's TLS area (and that can only happen during initial linking, of course). BTW, another advantage of TLS over getspecific /wrt task-self is that it overcomes its laziness: its now cheap and easy to set self in the thread trampoline. Philippe, could it be that vrtx's sc_tinquiry implementation is broken? I only find the corresponding pthread_setspecific in the lib constructor. That pattern totally disagrees with native and vxworks. Jan -- Siemens AG, Corporate Technology, CT SE 2 Corporate Competence Center Embedded Linux _______________________________________________ Xenomai-core mailing list Xenomai-core@gna.org https://mail.gna.org/listinfo/xenomai-core