From: Jan Kiszka <jan.kiszka@domain.hid>
To: Kent Borg <kentborg@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Signals
Date: Wed, 25 Jan 2006 23:31:55 +0100 [thread overview]
Message-ID: <43D7FC5B.2040202@domain.hid> (raw)
In-Reply-To: <20060125162403.Y17353@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1974 bytes --]
Kent Borg wrote:
> On Wed, Jan 25, 2006 at 09:20:28PM +0100, Jan Kiszka wrote:
>>> rt_task_catch() and rt_task_notify()?
>> Those function are - in contrast to what to doc states - not yet
>> available in userspace.
>
> No wonder information on them is so sparse.
>
>> So far Xenomai is lacking the infrastructure to
>> deliver hard-RT signals to userspace threads, only the Linux signals are
>> passed as usual.
>
> But they are passed, that is good.
>
>> Signals in multithreaded applications are tricky in general, even
>> without Xenomai. You may try to play with pthread_kill and
>> pthread_sigmask to control which thread receives a specific signal.
>
> I have a very simple architecture, one thread is launched by regular
> means, is launches the RT thread. It is the parent thread that
> registers for the signal and (I think!) it is the one that gets the
> interrupt.
Try printing pthread_self in your signal handler to be sure.
>
>> When the signal receiver is a Xenomai thread, the usual things happen:
>> blocking on RT-resources is cleared, the thread is migrated to secondary
>> mode, and the signal handler is invoked as one expects.
>
> Very interesting. It sounds like Xenomai is doing cleanup I was
> trying to do by hand. Maybe that is why I crapped the kernel, I am
> cleaning up stuff that doesn't exist anymore. Should I deallocate my
> RT fifos?
>
No, the native skin does not perform much automatic cleanup, especially
not for userspace objects. If I'm not overseeing some detail, the only
thing that gets cleaned up automatically on process termination are
tasks. Even on unloading the native skin module (when being a module at
all anymore), no forgotten userspace object gets deleted. The posix skin
does such cleanup, but only globally, on module unload.
So the rule is the cleanup everything as long as you are able to (i.e.
your application didn't die due to some bug etc.)
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
prev parent reply other threads:[~2006-01-25 22:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-18 21:24 [Xenomai-help] Signals Kent Borg
2006-01-25 20:20 ` Jan Kiszka
2006-01-25 21:24 ` Kent Borg
2006-01-25 22:31 ` Jan Kiszka [this message]
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=43D7FC5B.2040202@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=kentborg@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.