From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <48F348E8.7070001@domain.hid> Date: Mon, 13 Oct 2008 15:11:04 +0200 From: Wolfgang Grandegger MIME-Version: 1.0 References: <48F344D0.7080805@domain.hid> <48F344A7.4060003@domain.hid> In-Reply-To: <48F344A7.4060003@domain.hid> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] pthread_[set|get]specific() List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Gilles Chanteperdrix Cc: xenomai-help 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? In fact, I only need pthread_getspecific in the real-time context. Hm, is it really fast? Maybe scanning my private phtread ids is faster. Thanks. Wolfgang.