From: Philippe Gerum <rpm@xenomai.org>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-core] [PATCH] Check for NPTL and factor user-space skins initialization.
Date: Tue, 18 Apr 2006 17:23:45 +0200 [thread overview]
Message-ID: <44450481.3070102@domain.hid> (raw)
In-Reply-To: <17477.247.209915.347304@domain.hid>
Gilles Chanteperdrix wrote:
> Philippe Gerum wrote:
> >
> > -ENOPARSE here. Which code is expected to call xeno_mlock_alert_end()?
>
> pthread_set_mode_np and rt_task_set_mode. Sorry.
The issue I see doing so, is that you are going to trigger a SIGXCPU
right after setting the XNTRAPSW bit for the current thread, as a result
of calling sigaction and friends. This is why I used a plain and dumb
memory flag instead, the logic being:
- first, trap SIGXCPU in the library ctor to detect the lack of process
memory locking when mapping a shadow thread, and emit an explanatory
message when caught.
- as soon as a thread succeeds in setting modes (set_mode_np and
friends), then we know that a previous shadow mapping for the current
Linux task has succeeded, otherwise the nucleus would not have been able
to carry out the set_mode request. In such a case, make sure to cause
our internal SIGXCPU handler to switch to the default behaviour, in case
we did set the WARNSW bit for the current thread successfully. In all
other cases, either the user has set its own SIGXCPU handler overriding
our internal one, and we have no part in the play, or she did not and we
won't spuriously emit the "missing mlock" message.
--
Philippe.
next prev parent reply other threads:[~2006-04-18 15:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-18 14:39 [Xenomai-core] [PATCH] Check for NPTL and factor user-space skins initialization Gilles Chanteperdrix
2006-04-18 15:02 ` Philippe Gerum
2006-04-18 15:08 ` Gilles Chanteperdrix
2006-04-18 15:23 ` Philippe Gerum [this message]
2006-04-18 16:57 ` Gilles Chanteperdrix
2006-04-21 8:52 ` Philippe Gerum
2006-04-18 15:18 ` Jim Cromie
2006-04-18 15:46 ` Philippe Gerum
2006-04-18 17:04 ` Gilles Chanteperdrix
2006-04-18 17:44 ` 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=44450481.3070102@domain.hid \
--to=rpm@xenomai.org \
--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.