All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Mauro Salvini <mauro.salvini@domain.hid>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Signal mask inheritance
Date: Fri, 11 Feb 2011 12:04:20 +0100	[thread overview]
Message-ID: <4D5517B4.8060007@domain.hid> (raw)
In-Reply-To: <21119302.61297421436968.JavaMail.SYSTEM@pc-msalvini>

Mauro Salvini wrote:
> Hi to all,
> 
> I would build an application where only one of real-time tasks
> executes a custom signal handler to respond to a set of signals (ex
> SIGINT, SIGTERM). Xenomai tasks are also POSIX threads, so I think
> that at creation they inherits all signal masks and handlers from
> parent thread.

Handlers are per-process, not per-thread.

> So, what I can do in my app is reset signal mask to
> block all signals when new task starts.

Why do this? Why not only mask the signals you want to handle in the
separate thread?

And yes, you must let Xenomai thread handle SIGWINCH

> By the way, is there a method in Xenomai to initialize all RT_TASK
> structure fields without use field names (eg
> PTHREAD_MUTEX_INITIALIZER )? I use this simple define:

Well, as you found out, one of the members of the RT_TASK structure is
the pthread_t identifier of the corresponding thread, so, how do you
figure it would be possible to initialize the RT_TASK in advance before
the thread is even created?

And by the way, POSIX has PTHREAD_MUTEX_INITIALIZER, not
PTHREAD_INITIALIZER. So, you are comparing things which are not really
comparable.

Listen, we do have limited ressources to answer your questions, so
please take time to read some documentation, and think a bit before
asking questions.

-- 
					    Gilles.


      parent reply	other threads:[~2011-02-11 11:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <8218410.41297420786765.JavaMail.SYSTEM@pc-msalvini>
2011-02-11 10:50 ` [Xenomai-help] Signal mask inheritance Mauro Salvini
2011-02-11 11:00   ` Mauro Salvini
2011-02-11 11:04   ` Gilles Chanteperdrix [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=4D5517B4.8060007@domain.hid \
    --to=gilles.chanteperdrix@xenomai.org \
    --cc=mauro.salvini@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.