mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-11-09 08:37:58 +08:00
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:
1 parent
57f125d025
commit
0b422d5617
1 file changed
+1
-2
@@ -62,8 +62,7 @@ void _Event_Surrender(
|
||||
*/
|
||||
if ( _ISR_Is_in_progress() &&
|
||||
_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) ) {
|
||||
event->pending_events = _Event_sets_Clear(
|
||||
pending_events,
|
||||
|
||||
Reference in new issue
Block a user