[riot-notifications] [RIOT] posix: add pthread wrapper (#219)
notifications at github.com
Wed Nov 13 10:01:17 CET 2013
exactly. It is a POSIX thread feature that a compiler such as gcc or clang has to support.
What I understand of TSL is that the basic feature is to maintain a global map of the specific pthread assigned memory.
The access is mutual excluded and a mechanism to clean them up (free allocated memory) has to be provided.
This last point is, I think, somehow similar to the new/upcoming AUTO_FREE flag in tcb.
A pthread has to call pthread_key_delete(...) which cleans its own allocated variables when the pthread is finished (on exiting/dying).
I think at least these are the main POSIX thread functions used to access and maintain TLS in the pthread context:
void *pthread_getspecific(pthread_key_t key);
int pthread_setspecific(pthread_key_t key, const void *value);
int pthread_key_create(pthread_key_t *, void (*)(void *));
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications