rtems: Simplify _Event_Surrender()

It is impossible to reach the simplified expression if we are in the
THREAD_BLOCKING_OPERATION_TIMEOUT state since in this case Wait.count
(event condition) would be set to zero and thus the seized event set
would be empty.
This commit is contained in:
Sebastian Huber
2013-01-02 18:56:36 +01:00
parent 57f125d025
commit 0b422d5617

View File

@@ -62,8 +62,7 @@ void _Event_Surrender(
*/ */
if ( _ISR_Is_in_progress() && if ( _ISR_Is_in_progress() &&
_Thread_Is_executing( the_thread ) && _Thread_Is_executing( the_thread ) &&
((*sync_state == THREAD_BLOCKING_OPERATION_TIMEOUT) || *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) {
(*sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED)) ) {
if ( seized_events == event_condition || _Options_Is_any(option_set) ) { if ( seized_events == event_condition || _Options_Is_any(option_set) ) {
event->pending_events = _Event_sets_Clear( event->pending_events = _Event_sets_Clear(
pending_events, pending_events,