All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wolfgang Grandegger <wg@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] pthread_[set|get]specific()
Date: Mon, 13 Oct 2008 15:11:04 +0200	[thread overview]
Message-ID: <48F348E8.7070001@domain.hid> (raw)
In-Reply-To: <48F344A7.4060003@domain.hid>

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.




  reply	other threads:[~2008-10-13 13:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-13 12:53 [Xenomai-help] pthread_[set|get]specific() Wolfgang Grandegger
2008-10-13 12:52 ` Gilles Chanteperdrix
2008-10-13 13:11   ` Wolfgang Grandegger [this message]
2008-10-13 13:18     ` Gilles Chanteperdrix
2008-10-13 13:50   ` Philippe Gerum

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=48F348E8.7070001@domain.hid \
    --to=wg@domain.hid \
    --cc=gilles.chanteperdrix@xenomai.org \
    --cc=xenomai@xenomai.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.