RTEMS 6.1-rc1
semdata.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-2-Clause */
2
12/*
13 * COPYRIGHT (c) 1989-2008, 2016.
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_RTEMS_SEMDATA_H
39#define _RTEMS_RTEMS_SEMDATA_H
40
41#include <rtems/rtems/sem.h>
43#include <rtems/score/coresem.h>
44#include <rtems/score/mrsp.h>
45#include <rtems/score/object.h>
46
47#ifdef __cplusplus
48extern "C" {
49#endif
50
60typedef struct {
71
81 union {
86
92
98
99#if defined(RTEMS_SMP)
100 MRSP_Control MRSP;
101#endif
102 } Core_control;
104
109
110#if defined(RTEMS_MULTIPROCESSING)
118void _Semaphore_MP_Send_extract_proxy (
119 Thread_Control *the_thread,
120 Objects_Id id
121);
122#endif
123
135#if defined(RTEMS_SMP)
136#define SEMAPHORE_INFORMATION_DEFINE( max, scheduler_count ) \
137 typedef union { \
138 Objects_Control Object; \
139 Semaphore_Control Semaphore; \
140 struct { \
141 Objects_Control Object; \
142 MRSP_Control Control; \
143 Priority_Control ceiling_priorities[ scheduler_count ]; \
144 } MRSP; \
145 } Semaphore_Configured_control; \
146 OBJECTS_INFORMATION_DEFINE( \
147 _Semaphore, \
148 OBJECTS_CLASSIC_API, \
149 OBJECTS_RTEMS_SEMAPHORES, \
150 Semaphore_Configured_control, \
151 max, \
152 OBJECTS_NO_STRING_NAME, \
153 _Semaphore_MP_Send_extract_proxy \
154 )
155#else
156#define SEMAPHORE_INFORMATION_DEFINE( max, scheduler_count ) \
157 OBJECTS_INFORMATION_DEFINE( \
158 _Semaphore, \
159 OBJECTS_CLASSIC_API, \
160 OBJECTS_RTEMS_SEMAPHORES, \
161 Semaphore_Control, \
162 max, \
163 OBJECTS_NO_STRING_NAME, \
164 _Semaphore_MP_Send_extract_proxy \
165 )
166#endif
167
170#ifdef __cplusplus
171}
172#endif
173
174#endif
175/* end of include file */
This header file provides interfaces of the Mutex Handler which are used by the implementation and th...
This header file provides interfaces of the Semaphore Handler which are used by the implementation an...
Objects_Information _Semaphore_Information
The Classic Semaphore objects information.
uint32_t Objects_Id
Definition: object.h:101
This header file provides interfaces of the Multiprocessor Resource Sharing Protocol (MrsP) which are...
This header file provides interfaces of the Object Handler which are used by the implementation and t...
This header file defines the Semaphore Manager API.
The recursive mutex control with priority ceiling protocol support.
Definition: coremutex.h:101
Definition: coresem.h:64
Definition: objectdata.h:61
The information structure used to manage each API class of objects.
Definition: objectdata.h:198
Definition: semdata.h:60
Thread_queue_Control Wait_queue
The thread queue present in all other variants.
Definition: semdata.h:85
Objects_Control Object
The object management portion of a semaphore instance.
Definition: semdata.h:70
CORE_semaphore_Control Semaphore
Definition: semdata.h:97
CORE_ceiling_mutex_Control Mutex
Definition: semdata.h:91
Definition: threadq.h:609
Definition: thread.h:812