From: Jeff Webb <jeff.webb@domain.hid>
To: xenomai-help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] POSIX API Questions
Date: Tue, 03 Oct 2006 10:38:54 -0500 [thread overview]
Message-ID: <4522840E.50708@domain.hid> (raw)
In-Reply-To: <J6JUZA$835CBCA6714D18503B21543C9C3611BE@laposte.net>
gilles.chanteperdrix wrote:
> The main thread is automatically shadowed by the POSIX skin
> library initialization routine. Most people need this anyway
> and if they do not need it, it is harmless.
Thanks. That sounds like a good policy.
> A word about the process termination: using atexit is error
> prone, because the registered callback get called in the
> context of the thread that is calling exit, before the
> cancellation handlers are called, so for example if a thread
> is calling exit while holding a mutex and the routine
> registered with atexit need to lock the same mutex, the program
> deadlocks. I experienced various issues trying to terminate
> cleanly a posix application, the method I would advise is the
> one used by the switchtest program.
I will take a look at this. Thanks.
> I do not see anything suspicious, but in order to be sure you can
> use pthread_set_mode_np(0, PTHREAD_WARNSW) to cause a SIGXCPU
> signal to be sent when the calling thread involontary switches to
> secondary mode. See:
> http://www.xenomai.org/documentation/trunk/html/api/group__posix__thread.html#ga14
That's exactly what I need.
Thanks for the advice,
Jeff
next prev parent reply other threads:[~2006-10-03 15:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-03 7:47 Re:[Xenomai-help] POSIX API Questions gilles.chanteperdrix
2006-10-03 15:38 ` Jeff Webb [this message]
-- strict thread matches above, loose matches on Subject: below --
2006-10-02 18:16 [Xenomai-help] " Jeff Webb
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=4522840E.50708@domain.hid \
--to=jeff.webb@domain.hid \
--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.