RTEMS
threadqextractwithproxy.c
1 
13 /*
14  * COPYRIGHT (c) 1989-2012.
15  * On-Line Applications Research Corporation (OAR).
16  *
17  * The license and distribution terms for this file may be
18  * found in the file LICENSE in this distribution or at
19  * http://www.rtems.org/license/LICENSE.
20  */
21 
22 #ifdef HAVE_CONFIG_H
23 #include "config.h"
24 #endif
25 
27 #include <rtems/score/objectimpl.h>
28 #include <rtems/score/statesimpl.h>
29 
31  Thread_Control *the_thread
32 )
33 {
34  #if defined(RTEMS_MULTIPROCESSING)
35  States_Control state;
36 
37  state = the_thread->current_state;
38  if ( _States_Is_waiting_for_rpc_reply( state ) &&
39  _States_Is_locally_blocked( state ) ) {
40  Objects_Id id;
41  Objects_Information *the_information;
42  Objects_Thread_queue_Extract_callout proxy_extract_callout;
43 
44  id = the_thread->Wait.remote_id;
45  the_information = _Objects_Get_information_id( id );
46  proxy_extract_callout = the_information->extract;
47 
48  if ( proxy_extract_callout != NULL )
49  (*proxy_extract_callout)( the_thread, id );
50  }
51  #endif
52 
53  _Thread_queue_Extract( the_thread );
54 }
Thread_Wait_information Wait
Definition: thread.h:767
static __inline__ bool _States_Is_waiting_for_rpc_reply(States_Control the_states)
Checks if WAITING_FOR_TIME state is set.
Definition: statesimpl.h:249
Objects_Information * _Objects_Get_information_id(Objects_Id id)
Gets information of an object from an ID.
uint32_t States_Control
Definition: states.h:46
Inlined Routines in the Object Handler.
Constants and Structures Associated with the Manipulation of Objects.
void _Thread_queue_Extract_with_proxy(Thread_Control *the_thread)
_Thread_queue_Extract_with_proxy
States_Control current_state
Definition: thread.h:749
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
Inlined Routines Associated with Thread State Information.
uint32_t Objects_Id
Definition: object.h:80
void _Thread_queue_Extract(Thread_Control *the_thread)
Extracts thread from thread queue.
static __inline__ bool _States_Is_locally_blocked(States_Control the_states)
Checks if the state is blocked waiting on a local resource.
Definition: statesimpl.h:306