source: rtems/c/src/exec/score/src/threadqextractwithproxy.c @ 93b4e6ef

4.104.114.84.95
Last change on this file since 93b4e6ef was dfbfa2b0, checked in by Joel Sherrill <joel.sherrill@…>, on 11/02/99 at 20:36:11

Split threadq.c into multiple files.

  • Property mode set to 100644
File size: 1.5 KB
Line 
1/*
2 *  Thread Queue Handler
3 *
4 *
5 *  COPYRIGHT (c) 1989-1998.
6 *  On-Line Applications Research Corporation (OAR).
7 *  Copyright assigned to U.S. Government, 1994.
8 *
9 *  The license and distribution terms for this file may be
10 *  found in the file LICENSE in this distribution or at
11 *  http://www.OARcorp.com/rtems/license.html.
12 *
13 *  $Id$
14 */
15
16#include <rtems/system.h>
17#include <rtems/score/chain.h>
18#include <rtems/score/isr.h>
19#include <rtems/score/object.h>
20#include <rtems/score/states.h>
21#include <rtems/score/thread.h>
22#include <rtems/score/threadq.h>
23#include <rtems/score/tqdata.h>
24
25/*PAGE
26 *
27 *  _Thread_queue_Extract_with_proxy
28 *
29 *  This routine extracts the_thread from the_thread_queue
30 *  and insures that if there is a proxy for this task on
31 *  another node, it is also dealt with.
32 *
33 *  XXX
34 */
35 
36boolean _Thread_queue_Extract_with_proxy(
37  Thread_Control       *the_thread
38)
39{
40  States_Control                state;
41  Objects_Classes               the_class;
42  Thread_queue_Extract_callout  proxy_extract_callout;
43
44  state = the_thread->current_state;
45
46  if ( _States_Is_waiting_on_thread_queue( state ) ) {
47    if ( _States_Is_waiting_for_rpc_reply( state ) &&
48         _States_Is_locally_blocked( state ) ) {
49
50      the_class = _Objects_Get_class( the_thread->Wait.id );
51
52      proxy_extract_callout = _Thread_queue_Extract_table[ the_class ];
53
54      if ( proxy_extract_callout )
55        (*proxy_extract_callout)( the_thread );
56    }
57    _Thread_queue_Extract( the_thread->Wait.queue, the_thread );
58
59    return TRUE;
60  }
61  return FALSE;
62}
63
Note: See TracBrowser for help on using the repository browser.