public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Nick Garnett <nickg@ecoscentric.com>
To: "Zhichao Hong" <zhichao.hong@gmail.com>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] pthread_kill and signal lost or pending?
Date: Mon, 07 Apr 2008 16:36:00 -0000	[thread overview]
Message-ID: <m3bq4lfx0c.fsf@xl5.calivar.com> (raw)
In-Reply-To: <3fea10110804070901q2704793bq2788821fa55c11a5@mail.gmail.com>

"Zhichao Hong" <zhichao.hong@gmail.com> writes:

> Nick,
> 
> Thank you for you quick response!  Is the sigaction and sigqueue in
> eCos process wise or thread wise?  If sigqueue is called, is it for
> the whole process which is always 0 in eCos get the signal?

sigqueue() only delivers to the whole process. So you have to select
which thread gets the signal by manipulating the signal masks. Signal
handlers are global, as POSIX requires. Assuming anything about which
thread a signal handler is run in is not good practice. If you want to
restrict signal delivery to a particular thread, it is often more
sensible to use sigwait().

eCos only allows a pid value of 0 for any of the signal functions
since there is notionally only a single process.

-- 
Nick Garnett                                      eCos Kernel Architect
eCosCentric Limited    http://www.eCosCentric.com      The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK.     Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
**  Visit us at ESC Silicon Valley <http://www.embedded.com/esc/sv>  **
**  April 15-17 2008, Booth 3012, San Jose McEnery Convention Center **


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

      reply	other threads:[~2008-04-07 16:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-07 15:22 Zhichao Hong
2008-04-07 16:01 ` Nick Garnett
2008-04-07 16:30   ` Zhichao Hong
2008-04-07 16:36     ` Nick Garnett [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=m3bq4lfx0c.fsf@xl5.calivar.com \
    --to=nickg@ecoscentric.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=zhichao.hong@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).