summaryrefslogtreecommitdiffstats
path: root/cpukit/rtems/src/eventtimeout.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-21 23:09:07 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2009-07-21 23:09:07 +0000
commit4b45c1393ce4ee3e1c2762ef3145d2bd6b5b38da (patch)
tree4166e0d1b92b95716888ca2f8205afd34503f1e0 /cpukit/rtems/src/eventtimeout.c
parent2009-07-21 Joel Sherrill <joel.sherrill@OARcorp.com> (diff)
downloadrtems-4b45c1393ce4ee3e1c2762ef3145d2bd6b5b38da.tar.bz2
2009-07-21 Joel Sherrill <joel.sherrill@OARcorp.com>
* rtems/src/eventseize.c, rtems/src/eventsurrender.c, rtems/src/eventtimeout.c: Clean up and minor rework as a side-effect of coverage analysis.
Diffstat (limited to 'cpukit/rtems/src/eventtimeout.c')
-rw-r--r--cpukit/rtems/src/eventtimeout.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/cpukit/rtems/src/eventtimeout.c b/cpukit/rtems/src/eventtimeout.c
index 04abe71766..c1eef71f9e 100644
--- a/cpukit/rtems/src/eventtimeout.c
+++ b/cpukit/rtems/src/eventtimeout.c
@@ -63,22 +63,19 @@ void _Event_Timeout(
* this is the "timeout" transition. After a request is satisfied,
* a timeout is not allowed to occur.
*/
-
-
_ISR_Disable( level );
- if ( !the_thread->Wait.count ) { /* verify thread is waiting */
- _Thread_Unnest_dispatch();
- _ISR_Enable( level );
- return;
- }
+ #if defined(RTEMS_DEBUG)
+ if ( !the_thread->Wait.count ) { /* verify thread is waiting */
+ _Thread_Unnest_dispatch();
+ _ISR_Enable( level );
+ return;
+ }
+ #endif
the_thread->Wait.count = 0;
if ( _Thread_Is_executing( the_thread ) ) {
- Thread_blocking_operation_States sync = _Event_Sync_state;
- if ( (sync == THREAD_BLOCKING_OPERATION_SYNCHRONIZED) ||
- (sync == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED) ) {
+ if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED )
_Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT;
- }
}
the_thread->Wait.return_code = RTEMS_TIMEOUT;