public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] POSIX pause() never returns
@ 2007-06-12 23:30 Hans Rosenfeld
  2007-06-13 13:21 ` Hans Rosenfeld
  0 siblings, 1 reply; 2+ messages in thread
From: Hans Rosenfeld @ 2007-06-12 23:30 UTC (permalink / raw)
  To: ecos-discuss

While running some of the POSIX package testcases I noticed that pause()
never returns. I traced this problem to this patch:
http://sourceware.org/ml/ecos-patches/2006-07/msg00014.html

What happens here is that cyg_deliver_signals() is called through
posix_asr() -> cyg_posix_signal_asr() -> cyg_deliver_signals() while the
thread is waiting in pause(). After this the thread continues in the
while loop, calling cyg_deliver_signals() again. This call will return
false since there are no more signals pending, and the thread waits
again.

I don't understand the purpose of the above patch, but reverting it
makes pause() work as expected for me.


-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown

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

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

* Re: [ECOS] POSIX pause() never returns
  2007-06-12 23:30 [ECOS] POSIX pause() never returns Hans Rosenfeld
@ 2007-06-13 13:21 ` Hans Rosenfeld
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Rosenfeld @ 2007-06-13 13:21 UTC (permalink / raw)
  To: ecos-discuss

On Wed, Jun 13, 2007 at 12:12:26AM +0200, Hans Rosenfeld wrote:
> What happens here is that cyg_deliver_signals() is called through
> posix_asr() -> cyg_posix_signal_asr() -> cyg_deliver_signals() while the
> thread is waiting in pause(). After this the thread continues in the
> while loop, calling cyg_deliver_signals() again. This call will return
> false since there are no more signals pending, and the thread waits
> again.

I just noticed that the same applies to sigsuspend(), but this seems to
have been this way all the time. Am I missing something here?


-- 
%SYSTEM-F-ANARCHISM, The operating system has been overthrown

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

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

end of thread, other threads:[~2007-06-12 23:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-12 23:30 [ECOS] POSIX pause() never returns Hans Rosenfeld
2007-06-13 13:21 ` Hans Rosenfeld

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