From 736b8d27147f1c8e269353267e9c61b7df724119 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Wed, 31 Oct 2012 17:02:28 +0100 Subject: rtems: Use correct sync state for system events --- cpukit/rtems/src/eventtimeout.c | 37 ++++++++++--------------------------- 1 file changed, 10 insertions(+), 27 deletions(-) (limited to 'cpukit/rtems/src/eventtimeout.c') diff --git a/cpukit/rtems/src/eventtimeout.c b/cpukit/rtems/src/eventtimeout.c index eb0f84eaba..6e81a804ff 100644 --- a/cpukit/rtems/src/eventtimeout.c +++ b/cpukit/rtems/src/eventtimeout.c @@ -10,39 +10,22 @@ */ #if HAVE_CONFIG_H -#include "config.h" + #include "config.h" #endif -#include -#include #include -#include -#include -#include -#include -#include -#include - -/* - * _Event_Timeout - * - * This routine processes a thread which timeouts while waiting to - * receive an event_set. It is called by the watchdog handler. - * - * Input parameters: - * id - thread id - * - * Output parameters: NONE - */ void _Event_Timeout( Objects_Id id, - void *ignored + void *arg ) { - Thread_Control *the_thread; - Objects_Locations location; - ISR_Level level; + Thread_Control *the_thread; + Objects_Locations location; + ISR_Level level; + Thread_blocking_operation_States *sync_state; + + sync_state = arg; the_thread = _Thread_Get( id, &location ); switch ( location ) { @@ -71,8 +54,8 @@ void _Event_Timeout( the_thread->Wait.count = 0; if ( _Thread_Is_executing( the_thread ) ) { - if ( _Event_Sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) - _Event_Sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; + if ( *sync_state == THREAD_BLOCKING_OPERATION_NOTHING_HAPPENED ) + *sync_state = THREAD_BLOCKING_OPERATION_TIMEOUT; } the_thread->Wait.return_code = RTEMS_TIMEOUT; -- cgit v1.2.3