RTEMS 6.1-rc6
Loading...
Searching...
No Matches
threadmp.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
12/*
13 * COPYRIGHT (c) 1989-2009.
14 * On-Line Applications Research Corporation (OAR).
15 *
16 * Redistribution and use in source and binary forms, with or without
17 * modification, are permitted provided that the following conditions
18 * are met:
19 * 1. Redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer.
21 * 2. Redistributions in binary form must reproduce the above copyright
22 * notice, this list of conditions and the following disclaimer in the
23 * documentation and/or other materials provided with the distribution.
24 *
25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
28 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
29 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
35 * POSSIBILITY OF SUCH DAMAGE.
36 */
37
38#ifndef _RTEMS_SCORE_THREADMP_H
39#define _RTEMS_SCORE_THREADMP_H
40
41#ifndef _RTEMS_SCORE_THREADIMPL_H
42# error "Never use <rtems/score/threadmp.h> directly; include <rtems/score/threadimpl.h> instead."
43#endif
44
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
75 uint32_t maximum_proxies
76);
77
91 States_Control the_state
92);
93
106 Objects_Id the_id
107);
108
116#define _Thread_MP_Is_receive(_the_thread) \
117 ((_the_thread) == _MPCI_Receive_server_tcb)
118
130void _Thread_MP_Extract_proxy( Thread_Control *the_thread );
131
136void _Thread_MP_Free_proxy( Thread_Control *the_thread );
137
148static inline bool _Thread_MP_Is_remote( Objects_Id id )
149{
150 Objects_Information *information;
151
152 information = _Thread_Get_objects_information_by_id( id );
153 if ( information == NULL ) {
154 return false;
155 }
156
157 return _Objects_MP_Is_remote( id, information );
158}
159
162#ifdef __cplusplus
163}
164#endif
165
166#endif
167/* end of include file */
bool _Objects_MP_Is_remote(Objects_Id id, const Objects_Information *information)
Checks if the object identifier is in the global object identifier cache of the specified object info...
Definition: objectmp.c:371
uint32_t Objects_Id
Definition: object.h:101
uint32_t States_Control
Definition: states.h:65
void _Thread_MP_Handler_initialization(uint32_t maximum_proxies)
Initialize MP thread handler.
Definition: threadmp.c:68
void _Thread_MP_Extract_proxy(Thread_Control *the_thread)
Extracts the proxy of the thread if necessary.
Definition: threadqextractwithproxy.c:46
Thread_Control * _Thread_MP_Allocate_proxy(States_Control the_state)
Allocates a MP proxy control block from the inactive chain of free proxy control blocks.
Definition: threadmp.c:147
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:206
void _Thread_MP_Free_proxy(Thread_Control *the_thread)
Trees a proxy control block to the inactive chain of free proxy control blocks.
Definition: threadmp.c:228
This header file provides interfaces of the MPCI Handler which are only used by the implementation.
The information structure used to manage each API class of objects.
Definition: objectdata.h:198
Definition: thread.h:837