source: rtems/cpukit/rtems/include/rtems/rtems/semmp.h @ 62c528e6

5
Last change on this file since 62c528e6 was 62c528e6, checked in by Sebastian Huber <sebastian.huber@…>, on 05/20/16 at 12:59:30

rtems: _Semaphore_Get_interrupt_disable()

Use _Objects_Get_local() for _Semaphore_Get_interrupt_disable() to get
rid of the location parameter. Move remote object handling to semaphore
MPCI support.

  • Property mode set to 100644
File size: 4.3 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 MP Send Extract Proxy
124 *
125 *  This routine is invoked when a task is deleted and it
126 *  has a proxy which must be removed from a thread queue and
127 *  the remote node must be informed of this.
128 */
129void _Semaphore_MP_Send_extract_proxy (
130  Thread_Control *the_thread,
131  Objects_Id      id
132);
133
134/**
135 * @brief Semaphore Core Mutex MP Support
136 *
137 * This function processes the global actions necessary for remote
138 * accesses to a global semaphore based on a core mutex. This function
139 * is called by the core.
140 *
141 * @param[in] the_thread the remote thread the semaphore was surrendered to
142 * @param[in] id is the id of the surrendered semaphore
143 */
144void  _Semaphore_Core_mutex_mp_support (
145  Thread_Control *the_thread,
146  Objects_Id      id
147);
148
149/**
150 * @brief Semaphore Core MP Support
151 *
152 * This function processes the global actions necessary for remote
153 * accesses to a global semaphore based on a core semaphore. This function
154 * is called by the core.
155 *
156 * @param[in] the_thread the remote thread the semaphore was surrendered to
157 * @param[in] id is the id of the surrendered semaphore
158 */
159void  _Semaphore_Core_semaphore_mp_support (
160  Thread_Control *the_thread,
161  Objects_Id      id
162);
163
164#ifdef __cplusplus
165}
166#endif
167
168/**@}*/
169
170#endif
171/* end of file */
Note: See TracBrowser for help on using the repository browser.