Changeset c838e2f4 in rtems
- Timestamp:
- Jul 28, 2010, 8:39:48 PM (11 years ago)
- Branches:
- 4.11, 5, master
- Children:
- 57c841e9
- Parents:
- ec6a5a1
- Location:
- cpukit
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
cpukit/ChangeLog
rec6a5a1 rc838e2f4 1 2010-07-28 Vinu Rajashekhar <vinutheraj@gmail.com> 2 3 * posix/src/condinit.c, posix/src/condwaitsupp.c, 4 posix/src/psignalunblockthread.c: Clean up some signal interruption 5 code. 6 1 7 2010-07-27 Joel Sherrill <joel.sherrill@oarcorp.com> 2 8 -
cpukit/posix/src/condinit.c
rec6a5a1 rc838e2f4 45 45 * Be careful about attributes when global!!! 46 46 */ 47 48 47 if ( the_attr->process_shared == PTHREAD_PROCESS_SHARED ) 49 48 return EINVAL; … … 65 64 the_cond->Mutex = POSIX_CONDITION_VARIABLES_NO_MUTEX; 66 65 67 /* XXX some more initialization might need to go here */68 66 _Thread_queue_Initialize( 69 67 &the_cond->Wait_queue, 70 68 THREAD_QUEUE_DISCIPLINE_FIFO, 71 STATES_WAITING_FOR_CONDITION_VARIABLE ,69 STATES_WAITING_FOR_CONDITION_VARIABLE | STATES_INTERRUPTIBLE_BY_SIGNAL, 72 70 ETIMEDOUT 73 71 ); -
cpukit/posix/src/condwaitsupp.c
rec6a5a1 rc838e2f4 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)90 return status;96 if ( status == EINTR ) 97 status = 0; 91 98 92 99 } else { -
cpukit/posix/src/psignalunblockthread.c
rec6a5a1 rc838e2f4 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 0110 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 ) )
Note: See TracChangeset
for help on using the changeset viewer.