This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: pthread_kill and signal lost or pending?
"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