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
RevLine 
[4b487363]1/**
2 * @file rtems/rtems/semmp.h
[067a96a]3 *
[d106ab3]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.
[067a96a]11 */
12
[651e3aa]13/* COPYRIGHT (c) 1989-2013.
[d106ab3]14 * On-Line Applications Research Corporation (OAR).
[ac7d5ef0]15 *
[d106ab3]16 * The license and distribution terms for this file may be
17 * found in the file LICENSE in this distribution or at
[c499856]18 * http://www.rtems.org/license/LICENSE.
[ac7d5ef0]19 */
20
[092f142a]21#ifndef _RTEMS_RTEMS_SEMMP_H
22#define _RTEMS_RTEMS_SEMMP_H
[ac7d5ef0]23
[2bbea657]24#ifndef _RTEMS_RTEMS_SEMIMPL_H
25# error "Never use <rtems/rtems/semmp.h> directly; include <rtems/rtems/semimpl.h> instead."
26#endif
27
[ac7d5ef0]28#ifdef __cplusplus
29extern "C" {
30#endif
31
[067a96a]32/**
[c85ab23]33 *  @defgroup ClassicSEM Semaphore MP Support
34 *
35 *  @ingroup ClassicMP
[067a96a]36 *
[651e3aa]37 *  This encapsulates functionality related to the transparent multiprocessing
38 *  support within the Classic API Semaphore Manager.
[067a96a]39 */
40/**@{*/
41
42/**
[ac7d5ef0]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,
[45819022]53  SEMAPHORE_MP_RELEASE_RESPONSE =  6
[ac7d5ef0]54}   Semaphore_MP_Remote_operations;
55
[067a96a]56/**
[ac7d5ef0]57 *  The following data structure defines the packet used to perform
58 *  remote semaphore operations.
59 */
60typedef struct {
[3235ad9]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;
[ac7d5ef0]66}   Semaphore_MP_Packet;
67
[62c528e6]68RTEMS_INLINE_ROUTINE bool _Semaphore_MP_Is_remote( Objects_Id id )
69{
70  return _Objects_MP_Is_remote( id, &_Semaphore_Information );
71}
72
[067a96a]73/**
[52adc808]74 *  @brief Semaphore MP Send Process Packet
[ac7d5ef0]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,
[3235ad9]82  rtems_name                     name,
[ac7d5ef0]83  Objects_Id                     proxy_id
84);
85
[067a96a]86/**
[62c528e6]87 * @brief Issues a remote rtems_semaphore_obtain() request.
[ac7d5ef0]88 */
[62c528e6]89rtems_status_code _Semaphore_MP_Obtain(
90  rtems_id        id,
91  rtems_option    option_set,
92  rtems_interval  timeout
[ac7d5ef0]93);
94
[62c528e6]95/**
96 * @brief Issues a remote rtems_semaphore_release() request.
97 */
98rtems_status_code _Semaphore_MP_Release( rtems_id id );
99
[067a96a]100/**
[52adc808]101 *  @brief Semaphore MP Process Packet
[ac7d5ef0]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
[067a96a]110/**
[52adc808]111 *  @brief Semaphore MP Send Object was Deleted
[ac7d5ef0]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 (
[9809d6e0]118  Thread_Control *the_proxy,
119  Objects_Id      mp_id
[ac7d5ef0]120);
121
[067a96a]122/**
[52adc808]123 *  @brief Semaphore MP Send Extract Proxy
[ac7d5ef0]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 (
[9d9b6b56]130  Thread_Control *the_thread,
131  Objects_Id      id
[ac7d5ef0]132);
133
[067a96a]134/**
[52adc808]135 * @brief Semaphore Core Mutex MP Support
[067a96a]136 *
[d106ab3]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.
[52adc808]140 *
[d106ab3]141 * @param[in] the_thread the remote thread the semaphore was surrendered to
142 * @param[in] id is the id of the surrendered semaphore
[067a96a]143 */
144void  _Semaphore_Core_mutex_mp_support (
145  Thread_Control *the_thread,
[d3b72ca3]146  Objects_Id      id
[067a96a]147);
148
149/**
[d106ab3]150 * @brief Semaphore Core MP Support
[067a96a]151 *
[d106ab3]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.
[52adc808]155 *
[d106ab3]156 * @param[in] the_thread the remote thread the semaphore was surrendered to
157 * @param[in] id is the id of the surrendered semaphore
[067a96a]158 */
159void  _Semaphore_Core_semaphore_mp_support (
160  Thread_Control *the_thread,
[d3b72ca3]161  Objects_Id      id
[067a96a]162);
163
[ac7d5ef0]164#ifdef __cplusplus
165}
166#endif
167
[f9293df]168/**@}*/
169
[ac7d5ef0]170#endif
171/* end of file */
Note: See TracBrowser for help on using the repository browser.