diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-30 08:36:08 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2016-03-30 08:45:58 +0200 |
commit | 9d9b6b56d1ecf0d8918556835fa0f83289140791 (patch) | |
tree | 65391cb550493bbac4cdb490b800807ee4d7734f /cpukit/score | |
parent | score: Fix set but not used warning (diff) | |
download | rtems-9d9b6b56d1ecf0d8918556835fa0f83289140791.tar.bz2 |
score: Objects_Thread_queue_Extract_callout
Change parameters of the objects thread queue extract callout to avoid a
cast and explicit use of the thread wait information.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/include/rtems/score/objectimpl.h | 5 | ||||
-rw-r--r-- | cpukit/score/src/threadqextractwithproxy.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/cpukit/score/include/rtems/score/objectimpl.h b/cpukit/score/include/rtems/score/objectimpl.h index 3adf3a795f..786910e2e6 100644 --- a/cpukit/score/include/rtems/score/objectimpl.h +++ b/cpukit/score/include/rtems/score/objectimpl.h @@ -127,7 +127,10 @@ typedef enum { * is extracted from a remote thread queue (i.e. it's proxy must * extracted from the remote queue). */ -typedef void ( *Objects_Thread_queue_Extract_callout )( void * ); +typedef void ( *Objects_Thread_queue_Extract_callout )( + Thread_Control *, + Objects_Id +); /** * The following defines the structure for the information used to diff --git a/cpukit/score/src/threadqextractwithproxy.c b/cpukit/score/src/threadqextractwithproxy.c index 72043a094d..9bbf9c6f64 100644 --- a/cpukit/score/src/threadqextractwithproxy.c +++ b/cpukit/score/src/threadqextractwithproxy.c @@ -37,14 +37,16 @@ void _Thread_queue_Extract_with_proxy( state = the_thread->current_state; if ( _States_Is_waiting_for_rpc_reply( state ) && _States_Is_locally_blocked( state ) ) { + Objects_Id id; Objects_Information *the_information; Objects_Thread_queue_Extract_callout proxy_extract_callout; - the_information = _Objects_Get_information_id( the_thread->Wait.id ); + id = the_thread->Wait.id; + the_information = _Objects_Get_information_id( id ); proxy_extract_callout = the_information->extract; if ( proxy_extract_callout != NULL ) - (*proxy_extract_callout)( the_thread ); + (*proxy_extract_callout)( the_thread, id ); } #endif |