source: rtems/cpukit/score/src/threadqextractwithproxy.c @ 25f5730f

4.115
Last change on this file since 25f5730f was 600bb68f, checked in by Sebastian Huber <sebastian.huber@…>, on 03/27/14 at 07:30:51

score: _Thread_queue_Extract_with_proxy()

Drop the return status, since it is nowhere used.

  • Property mode set to 100644
File size: 1.7 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  Thread_queue_Control *the_thread_queue;
35
36  #if defined(RTEMS_MULTIPROCESSING)
37    States_Control state;
38
39    state = the_thread->current_state;
40    if ( _States_Is_waiting_for_rpc_reply( state ) &&
41         _States_Is_locally_blocked( state ) ) {
42      Objects_Information                  *the_information;
43      Objects_Thread_queue_Extract_callout  proxy_extract_callout;
44
45      the_information = _Objects_Get_information_id( the_thread->Wait.id );
46      proxy_extract_callout = the_information->extract;
47
48      if ( proxy_extract_callout != NULL )
49        (*proxy_extract_callout)( the_thread );
50    }
51  #endif
52
53  the_thread_queue = the_thread->Wait.queue;
54  if ( the_thread_queue != NULL ) {
55    _Thread_queue_Extract( the_thread_queue, the_thread );
56  }
57}
Note: See TracBrowser for help on using the repository browser.