source: rtems/cpukit/score/src/threadqextractwithproxy.c @ 1c2d178

5
Last change on this file since 1c2d178 was 97312fcc, checked in by Sebastian Huber <sebastian.huber@…>, on 04/05/16 at 12:36:30

score: Delete Thread_Wait_information::id

This field was only by the monitor in non-multiprocessing
configurations. Add new field Thread_Wait_information::remote_id in
multiprocessing configurations and use it for the remote procedure call
thread queue.

Add _Thread_Wait_get_id() to obtain the object identifier for debug and
system information tools. Ensure the object layout via static asserts.
Add test cases to sptests/spthreadq01.

  • Property mode set to 100644
File size: 1.6 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_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}
Note: See TracBrowser for help on using the repository browser.