summaryrefslogtreecommitdiffstats
path: root/cpukit/posix/src
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-29 18:34:22 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-29 18:34:22 +0000
commit634adfeeae78c6e24162f293985eb2c7c6a752cc (patch)
tree1797cd22221ddd37ab29a4b62635f11e681e4d20 /cpukit/posix/src
parent2009-07-29 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-634adfeeae78c6e24162f293985eb2c7c6a752cc.tar.bz2
2009-07-29 Joel Sherrill <joel.sherrill@OARcorp.com>
* posix/src/killinfo.c: Add _Thread_Enable_dispatch() on EAGAIN error case. Add debug print on loop processing threads waiting for signal. * posix/src/psignal.c: When the sigwait() Thread Queue processing loop was changed to FIFO, I forgot to change the initialization to match.
Diffstat (limited to 'cpukit/posix/src')
-rw-r--r--cpukit/posix/src/killinfo.c9
-rw-r--r--cpukit/posix/src/psignal.c2
2 files changed, 9 insertions, 2 deletions
diff --git a/cpukit/posix/src/killinfo.c b/cpukit/posix/src/killinfo.c
index f0201a5bd6..7c0f38e95a 100644
--- a/cpukit/posix/src/killinfo.c
+++ b/cpukit/posix/src/killinfo.c
@@ -144,6 +144,11 @@ int killinfo(
the_thread = (Thread_Control *)the_node;
api = the_thread->API_Extensions[ THREAD_API_POSIX ];
+ #if defined(DEBUG_SIGNAL_PROCESSING)
+ printk( "Waiting Thread=%p option=0x%08x mask=0x%08x blocked=0x%08x\n",
+ the_thread, the_thread->Wait.option, mask, api->signals_blocked);
+ #endif
+
/*
* Is this thread is actually blocked waiting for the signal?
*/
@@ -332,8 +337,10 @@ post_process_signal:
psiginfo = (POSIX_signals_Siginfo_node *)
_Chain_Get( &_POSIX_signals_Inactive_siginfo );
- if ( !psiginfo )
+ if ( !psiginfo ) {
+ _Thread_Enable_dispatch();
rtems_set_errno_and_return_minus_one( EAGAIN );
+ }
psiginfo->Info = *siginfo;
diff --git a/cpukit/posix/src/psignal.c b/cpukit/posix/src/psignal.c
index 922908724e..60e9a7bfb7 100644
--- a/cpukit/posix/src/psignal.c
+++ b/cpukit/posix/src/psignal.c
@@ -196,7 +196,7 @@ void _POSIX_signals_Manager_Initialization(void)
*/
_Thread_queue_Initialize(
&_POSIX_signals_Wait_queue,
- THREAD_QUEUE_DISCIPLINE_PRIORITY,
+ THREAD_QUEUE_DISCIPLINE_FIFO,
STATES_WAITING_FOR_SIGNAL | STATES_INTERRUPTIBLE_BY_SIGNAL,
EAGAIN
);