[rtems commit] rtems: Simplify _Event_Surrender()
Sebastian Huber
sebh at rtems.org
Mon Jan 7 14:11:44 UTC 2013
Module: rtems
Branch: master
Commit: 0b422d5617616c9843c5ff02d76ba2d74fd39eea
Changeset: http://git.rtems.org/rtems/commit/?id=0b422d5617616c9843c5ff02d76ba2d74fd39eea
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Jan 2 18:56:36 2013 +0100
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.
---
cpukit/rtems/src/eventsurrender.c | 3 +--
1 files changed, 1 insertions(+), 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,
More information about the vc
mailing list