RTEMS CPU Kit with SuperCore  4.11.2
threadmp.h
Go to the documentation of this file.
1 
10 /*
11  * COPYRIGHT (c) 1989-2009.
12  * On-Line Applications Research Corporation (OAR).
13  *
14  * The license and distribution terms for this file may be
15  * found in the file LICENSE in this distribution or at
16  * http://www.rtems.org/license/LICENSE.
17  */
18 
19 #ifndef _RTEMS_SCORE_THREADMP_H
20 #define _RTEMS_SCORE_THREADMP_H
21 
22 #ifndef _RTEMS_SCORE_THREADIMPL_H
23 # error "Never use <rtems/score/threadmp.h> directly; include <rtems/score/threadimpl.h> instead."
24 #endif
25 
26 #include <rtems/score/mpciimpl.h>
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
50  uint32_t maximum_proxies
51 );
52 
64  States_Control the_state
65 );
66 
75  Objects_Id the_id
76 );
77 
84 
91 
99 #define _Thread_MP_Is_receive(_the_thread) \
100  ((_the_thread) == _MPCI_Receive_server_tcb)
101 
108  Thread_Control *the_thread
109 )
110 {
111  Thread_Proxy_control *the_proxy;
112 
113  the_proxy = (Thread_Proxy_control *) the_thread;
114 
115  _Chain_Extract( &the_proxy->Active );
116 
117  _Chain_Append( &_Thread_MP_Inactive_proxies, &the_thread->Object.Node );
118 }
119 
122 #ifdef __cplusplus
123 }
124 #endif
125 
126 #endif
127 /* end of include file */
Chain_Node Active
This field is used to manage the set of proxies in the system.
Definition: thread.h:415
#define RTEMS_INLINE_ROUTINE
The following (in conjunction with compiler arguments) are used to choose between the use of static i...
Definition: basedefs.h:135
void _Chain_Extract(Chain_Node *the_node)
Extract the specified node from a chain.
Definition: chainextract.c:27
SCORE_EXTERN Chain_Control _Thread_MP_Active_proxies
Manage the active set MP proxies.
Definition: threadmp.h:83
This is used to manage a chain.
Definition: chain.h:83
SCORE_EXTERN Chain_Control _Thread_MP_Inactive_proxies
Manage the inactive set of MP proxies.
Definition: threadmp.h:90
Objects_Control Object
This field is the object management structure for each thread.
Definition: thread.h:673
This structure defines the Thread Control Block (TCB).
Definition: thread.h:671
Chain_Node Node
This is the chain node portion of an object.
Definition: object.h:234
Thread_Control * _Thread_MP_Find_proxy(Objects_Id the_id)
Removes the MP proxy control block for the specified id from the active chain of proxy control blocks...
Definition: threadmp.c:103
uint32_t States_Control
The following type defines the control block used to manage a thread&#39;s state.
Definition: states.h:41
void _Chain_Append(Chain_Control *the_chain, Chain_Node *the_node)
Append a node on the end of a chain.
Definition: chainappend.c:41
Thread_Control * _Thread_MP_Allocate_proxy(States_Control the_state)
Allocate a MP proxy control block from the inactive chain of free proxy control blocks.
Definition: threadmp.c:49
The following defines the control block used to manage each thread proxy.
Definition: thread.h:361
uint32_t Objects_Id
The following type defines the control block used to manage object IDs.
Definition: object.h:122
#define SCORE_EXTERN
The following ensures that all data is declared in the space of the initialization routine for either...
Definition: basedefs.h:81
void _Thread_MP_Handler_initialization(uint32_t maximum_proxies)
Initialize MP thread handler.
Definition: threadmp.c:25
MPCI Layer Implementation.
RTEMS_INLINE_ROUTINE void _Thread_MP_Free_proxy(Thread_Control *the_thread)
This routine frees a proxy control block to the inactive chain of free proxy control blocks...
Definition: threadmp.h:107