source: rtems/cpukit/score/src/threadqextractwithproxy.c @ 1506658c

5
Last change on this file since 1506658c was 22788bc, checked in by Sebastian Huber <sebastian.huber@…>, on 04/23/15 at 11:01:05

score: _Thread_queue_Extract()

Remove thread queue parameter from _Thread_queue_Extract() since the
current thread queue is stored in the thread control block.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/**
2 *  @brief _Thread_queue_Extract_with_proxy
3 *
4 *  This routine extracts the_thread from the_thread_queue
5 *  and ensures that if there is a proxy for this task on
6 *  another node, it is also dealt with. A proxy is a data
7 *  data that is on the thread queue on the remote node and
8 *  acts as a proxy for the local thread. If the local thread
9 *  was waiting on a remote operation, then the remote side
10 *  of the operation must be cleaned up.
11 */
12
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#if HAVE_CONFIG_H
23#include "config.h"
24#endif
25
26#include <rtems/score/threadqimpl.h>
27#include <rtems/score/objectimpl.h>
28#include <rtems/score/statesimpl.h>
29
30void _Thread_queue_Extract_with_proxy(
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_Information                  *the_information;
41      Objects_Thread_queue_Extract_callout  proxy_extract_callout;
42
43      the_information = _Objects_Get_information_id( the_thread->Wait.id );
44      proxy_extract_callout = the_information->extract;
45
46      if ( proxy_extract_callout != NULL )
47        (*proxy_extract_callout)( the_thread );
48    }
49  #endif
50
51  _Thread_queue_Extract( the_thread );
52}
Note: See TracBrowser for help on using the repository browser.