All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <kiszka@domain.hid>
To: Paolo Gai <pj@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Xenomai 2.0.1 - Posix Skin - implementing a periodic thread
Date: Tue, 13 Dec 2005 19:22:54 +0100	[thread overview]
Message-ID: <439F117E.7030606@domain.hid> (raw)
In-Reply-To: <439F0B78.2000002@domain.hid>

[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]

Paolo Gai wrote:
> Dear all,
> 
> here is another small demo... this time of a periodic thread in POSIX.
> 
> It works under Xenomai, but it fails under Posix Real-Time.
> 
> The reason of the failure is the SIGUSR1 not being blocked by the main
> thread. If in main() the comments below the note "// REMOVE THE COMMENTS
> BELOW" are removed, then the signal is masked also in the main(), and as
> a result the POSIX version works.
> 
> The question I have is if the behavior in Xenomai (that is, not failing
> like the POSIX counterpart) is correct or not...
> 

Without having read your program in details and thought about the signal
behaviour as well, just two general remarks:

1. Signals are not yet supported by Xenomai in primary mode. All you
receive are Linux signals so that the real-time thread is effectively
running only in secondary mode (also due to the printf).

2. Periodic threads can be set up more easily and efficiently under
POSIX by using clock_nanosleep with absolute timeouts.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2005-12-13 18:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13 17:57 [Xenomai-help] Xenomai 2.0.1 - Posix Skin - implementing a periodic thread Paolo Gai
2005-12-13 18:22 ` Jan Kiszka [this message]
2005-12-13 20:27 ` Gilles Chanteperdrix

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=439F117E.7030606@domain.hid \
    --to=kiszka@domain.hid \
    --cc=pj@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.