Gilles Chanteperdrix wrote: > Wolfgang Grandegger wrote: >> Hello, >> >> can pthread_[set|get]specifi()c be used safely in user space real-time >> tasks. Or does it result in a switch to secondary mode? > > I would expect pthread_getspecific to be safe on all platforms though > (and actually, I think the fast mutexes implementation relies on that). > > I would say it should be always safe or always non-safe. So, you may run > a test with T_WARNSW (or XNTRAPSW) and you will know whether the > implementation on your platform is safe. > > pthread_setspecific is another story, maybe it can trigger a re-allocation? >
It does call calloc() when two-level indexing is needed to register new keys. This said, this will only happen when more than 32 keys are created. Ok, it's fragile... -- Philippe. _______________________________________________ Xenomai-help mailing list [email protected] https://mail.gna.org/listinfo/xenomai-help
