public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] POSIX timer callback context
@ 2003-10-28 21:09 Dan Jakubiec
  2003-10-29 15:33 ` Nick Garnett
  0 siblings, 1 reply; 11+ messages in thread
From: Dan Jakubiec @ 2003-10-28 21:09 UTC (permalink / raw)
  To: ecos-discuss

I'm using a POSIX timer in my application that I
created with timer_create().  It is configured to
generate a SIGUSR1 signal when the timer expires, and
to call a signal handler installed by my app's thread.
 I also have several different tasks running that were
all created with pthread_create().

When the timer expires, the signal handler gets
executed, but it appears to be executing in a another
thread's context (i.e. pthread_self() returns the
handle for one of my other threads).  Furthermore, the
thread that installed the handler is waiting in a
pselect() call that never gets interrupted with EINTR.

This seems like a bug to me, but I wanted to pass this
by the group before fixing it to make sure I wasn't
missing anything.  Seems like there is a bit of a grey
area in the POSIX docs about whether signals get
delivered to the "process" or one of its "threads". 
However, it seems that in eCos it would only make
sense to deliver signals to the calling thread itself.

Does anyone have any background info on the eCos
implementation of POSIX timers, or an opinion on how
POSIX timer callbacks should be processed?

--
Dan Jakubiec
Systech Corp

__________________________________
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
http://launch.yahoo.com/promos/britneyspears/

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2003-11-03 18:36 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-28 21:09 [ECOS] POSIX timer callback context Dan Jakubiec
2003-10-29 15:33 ` Nick Garnett
2003-10-29 17:04   ` Dan Jakubiec
2003-10-30 15:32     ` Nick Garnett
2003-10-30 17:00   ` Dan Jakubiec
2003-10-31 18:09     ` Nick Garnett
2003-11-02 23:19       ` Dan Jakubiec
2003-11-03 13:15         ` mbs
2003-11-03 17:57           ` Dan Jakubiec
2003-11-03 18:36             ` mbs
2003-11-03 18:14           ` Dan Jakubiec

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).