diff --git a/cpukit/posix/src/condinit.c b/cpukit/posix/src/condinit.c
index 1b69cfa..d4bdd50 100644
a
|
b
|
int pthread_cond_init( |
68 | 68 | _Thread_queue_Initialize( |
69 | 69 | &the_cond->Wait_queue, |
70 | 70 | THREAD_QUEUE_DISCIPLINE_FIFO, |
71 | | STATES_WAITING_FOR_CONDITION_VARIABLE, |
| 71 | STATES_WAITING_FOR_CONDITION_VARIABLE |
| 72 | | STATES_INTERRUPTIBLE_BY_SIGNAL, |
72 | 73 | ETIMEDOUT |
73 | 74 | ); |
74 | 75 | |
diff --git a/cpukit/posix/src/condwaitsupp.c b/cpukit/posix/src/condwaitsupp.c
index 45dfb77..032eafb 100644
a
|
b
|
int _POSIX_Condition_variables_Wait_support( |
85 | 85 | * _Thread_queue_Enqueue. |
86 | 86 | */ |
87 | 87 | |
| 88 | /* |
| 89 | * If the thread is interrupted, while in the thread queue, by |
| 90 | * a POSIX signal, then pthread_cond_wait returns spuriously, |
| 91 | * according to the POSIX standard. It means that pthread_cond_wait |
| 92 | * returns a success status, except for the fact that it was not |
| 93 | * woken up a pthread_cond_signal or a pthread_cond_broadcast. |
| 94 | */ |
88 | 95 | status = _Thread_Executing->Wait.return_code; |
89 | | if ( status && status != ETIMEDOUT ) |
| 96 | if ( status && status != ETIMEDOUT && status != EINTR ) |
90 | 97 | return status; |
| 98 | else if ( status == EINTR ) |
| 99 | status = 0; |
91 | 100 | |
92 | 101 | } else { |
93 | 102 | _Thread_Enable_dispatch(); |
diff --git a/cpukit/posix/src/psignalunblockthread.c b/cpukit/posix/src/psignalunblockthread.c
index 551f5eb..c35dd1d 100644
a
|
b
|
bool _POSIX_signals_Unblock_thread( |
101 | 101 | if ( the_thread->current_state & STATES_INTERRUPTIBLE_BY_SIGNAL ) { |
102 | 102 | the_thread->Wait.return_code = EINTR; |
103 | 103 | /* |
104 | | * At this time, there is no RTEMS API object which lets a task |
105 | | * block on a thread queue and be interruptible by a POSIX signal. |
106 | | * If an object class with that requirement is ever added, enable |
107 | | * this code. |
| 104 | * In pthread_cond_wait, a thread will be blocking on a thread |
| 105 | * queue, but is also interruptible by a POSIX signal. |
108 | 106 | */ |
109 | | #if 0 |
110 | 107 | if ( _States_Is_waiting_on_thread_queue(the_thread->current_state) ) |
111 | 108 | _Thread_queue_Extract_with_proxy( the_thread ); |
112 | | else |
113 | | #endif |
114 | | if ( _States_Is_delaying(the_thread->current_state) ){ |
| 109 | else if ( _States_Is_delaying(the_thread->current_state) ){ |
115 | 110 | if ( _Watchdog_Is_active( &the_thread->Timer ) ) |
116 | 111 | (void) _Watchdog_Remove( &the_thread->Timer ); |
117 | 112 | _Thread_Unblock( the_thread ); |
118 | 113 | } |
| 114 | |
119 | 115 | } else if ( the_thread->current_state == STATES_READY ) { |
120 | 116 | if ( _ISR_Is_in_progress() && _Thread_Is_executing( the_thread ) ) |
121 | 117 | _Context_Switch_necessary = true; |