[PATCH 3/5] rtems: Simplify _Event_Surrender()
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Jan 2 17:56:36 UTC 2013
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 also.
---
cpukit/rtems/src/eventsurrender.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/cpukit/rtems/src/eventsurrender.c b/cpukit/rtems/src/eventsurrender.c
index d0b1004..ce7edc7 100644
--- a/cpukit/rtems/src/eventsurrender.c
+++ b/cpukit/rtems/src/eventsurrender.c
@@ -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,
--
1.7.10.4
More information about the devel
mailing list