source: rtems/cpukit/include/rtems/rtems/semmp.h @ 21275b58

Last change on this file since 21275b58 was 21275b58, checked in by Sebastian Huber <sebastian.huber@…>, on Nov 22, 2018 at 6:14:51 PM

score: Static Objects_Information initialization

Statically allocate the objects information together with the initial
set of objects either via <rtems/confdefs.h>. Provide default object
informations with zero objects via librtemscpu.a. This greatly
simplifies the workspace size estimate. RTEMS applications which do not
use the unlimited objects option are easier to debug since all objects
reside now in statically allocated objects of the right types.

Close #3621.

  • Property mode set to 100644
File size: 4.0 KB
Line 
1/**
2 * @file rtems/rtems/semmp.h
3 *
4 * @defgroup ClassicSEM Semaphore MP Support
5 *
6 * @ingroup ClassicRTEMS
7 * @brief Semaphore Manager MP Support
8 *
9 * This include file contains all the constants and structures associated
10 * with the Multiprocessing Support in the Semaphore Manager.
11 */
12
13/* COPYRIGHT (c) 1989-2013.
14 * On-Line Applications Research Corporation (OAR).
15 *
16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
18 * http://www.rtems.org/license/LICENSE.
19 */
20
21#ifndef _RTEMS_RTEMS_SEMMP_H
22#define _RTEMS_RTEMS_SEMMP_H
23
24#ifndef _RTEMS_RTEMS_SEMIMPL_H
25# error "Never use <rtems/rtems/semmp.h> directly; include <rtems/rtems/semimpl.h> instead."
26#endif
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32/**
33 *  @defgroup ClassicSEM Semaphore MP Support
34 *
35 *  @ingroup ClassicMP
36 *
37 *  This encapsulates functionality related to the transparent multiprocessing
38 *  support within the Classic API Semaphore Manager.
39 */
40/**@{*/
41
42/**
43 *  The following enumerated type defines the list of
44 *  remote semaphore operations.
45 */
46typedef enum {
47  SEMAPHORE_MP_ANNOUNCE_CREATE  =  0,
48  SEMAPHORE_MP_ANNOUNCE_DELETE  =  1,
49  SEMAPHORE_MP_EXTRACT_PROXY    =  2,
50  SEMAPHORE_MP_OBTAIN_REQUEST   =  3,
51  SEMAPHORE_MP_OBTAIN_RESPONSE  =  4,
52  SEMAPHORE_MP_RELEASE_REQUEST  =  5,
53  SEMAPHORE_MP_RELEASE_RESPONSE =  6
54}   Semaphore_MP_Remote_operations;
55
56/**
57 *  The following data structure defines the packet used to perform
58 *  remote semaphore operations.
59 */
60typedef struct {
61  rtems_packet_prefix             Prefix;
62  Semaphore_MP_Remote_operations  operation;
63  rtems_name                      name;
64  rtems_option                    option_set;
65  Objects_Id                      proxy_id;
66}   Semaphore_MP_Packet;
67
68RTEMS_INLINE_ROUTINE bool _Semaphore_MP_Is_remote( Objects_Id id )
69{
70  return _Objects_MP_Is_remote( id, &_Semaphore_Information );
71}
72
73/**
74 *  @brief Semaphore MP Send Process Packet
75 *
76 *  This routine performs a remote procedure call so that a
77 *  process operation can be performed on another node.
78 */
79void _Semaphore_MP_Send_process_packet (
80  Semaphore_MP_Remote_operations operation,
81  Objects_Id                     semaphore_id,
82  rtems_name                     name,
83  Objects_Id                     proxy_id
84);
85
86/**
87 * @brief Issues a remote rtems_semaphore_obtain() request.
88 */
89rtems_status_code _Semaphore_MP_Obtain(
90  rtems_id        id,
91  rtems_option    option_set,
92  rtems_interval  timeout
93);
94
95/**
96 * @brief Issues a remote rtems_semaphore_release() request.
97 */
98rtems_status_code _Semaphore_MP_Release( rtems_id id );
99
100/**
101 *  @brief Semaphore MP Process Packet
102 *
103 *  This routine performs the actions specific to this package for
104 *  the request from another node.
105 */
106void _Semaphore_MP_Process_packet (
107  rtems_packet_prefix *the_packet_prefix
108);
109
110/**
111 *  @brief Semaphore MP Send Object was Deleted
112 *
113 *  This routine is invoked indirectly by the thread queue
114 *  when a proxy has been removed from the thread queue and
115 *  the remote node must be informed of this.
116 */
117void _Semaphore_MP_Send_object_was_deleted (
118  Thread_Control *the_proxy,
119  Objects_Id      mp_id
120);
121
122/**
123 * @brief Semaphore Core Mutex MP Support
124 *
125 * This function processes the global actions necessary for remote
126 * accesses to a global semaphore based on a core mutex. This function
127 * is called by the core.
128 *
129 * @param[in] the_thread the remote thread the semaphore was surrendered to
130 * @param[in] id is the id of the surrendered semaphore
131 */
132void  _Semaphore_Core_mutex_mp_support (
133  Thread_Control *the_thread,
134  Objects_Id      id
135);
136
137/**
138 * @brief Semaphore Core MP Support
139 *
140 * This function processes the global actions necessary for remote
141 * accesses to a global semaphore based on a core semaphore. This function
142 * is called by the core.
143 *
144 * @param[in] the_thread the remote thread the semaphore was surrendered to
145 * @param[in] id is the id of the surrendered semaphore
146 */
147void  _Semaphore_Core_semaphore_mp_support (
148  Thread_Control *the_thread,
149  Objects_Id      id
150);
151
152#ifdef __cplusplus
153}
154#endif
155
156/**@}*/
157
158#endif
159/* end of file */
Note: See TracBrowser for help on using the repository browser.