On Wed, 2006-11-22 at 12:38 +0100, M. Koehrer wrote: > Hi all, > Background of the question: > I want to write an application that uses a couple of similar tasks. > I have to store some task-specific information (internal states...). > Now I am looking for a simple way to get this information at runtime from my > task > by calling rt_task_self() (or something similar) to use this address to reach > my > additional information. >
Use pthread_getspecific() for obtaining back a TLS data previously defined by pthread_setspecific(), indexed on a TLS key obtained from pthread_key_create(). Warning: AFAICT, only pthread_getspecific() refrain from performing any kind of Linux syscall (in the current NPTL and older LinuxThreads implementation, that is), thus won't migrate your RT task to secondary mode when called. The two others could call vanilla kernel services, so you must use them during non-critical preliminary init steps of your task. -- Philippe. _______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
