forked from Imagelibrary/rtems
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:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user