RTEMS
6.3
Toggle main menu visibility
Loading...
Searching...
No Matches
cpukit
include
rtems
rtems
semdata.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-2-Clause */
2
11
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
>
42
#include <
rtems/score/coremutex.h
>
43
#include <
rtems/score/coresem.h
>
44
#include <
rtems/score/mrsp.h
>
45
#include <
rtems/score/object.h
>
46
47
#ifdef __cplusplus
48
extern
"C"
{
49
#endif
50
56
60
typedef
struct
{
70
Objects_Control
Object
;
71
81
union
{
85
Thread_queue_Control
Wait_queue
;
86
91
CORE_ceiling_mutex_Control
Mutex
;
92
97
CORE_semaphore_Control
Semaphore
;
98
99
#if defined(RTEMS_SMP)
100
MRSP_Control MRSP;
101
#endif
102
} Core_control;
103
}
Semaphore_Control
;
104
108
extern
Objects_Information
_Semaphore_Information
;
109
110
#if defined(RTEMS_MULTIPROCESSING)
118
void
_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
169
170
#ifdef __cplusplus
171
}
172
#endif
173
174
#endif
175
/* end of include file */
coremutex.h
This header file provides interfaces of the Mutex Handler which are used by the implementation and th...
coresem.h
This header file provides interfaces of the Semaphore Handler which are used by the implementation an...
_Semaphore_Information
Objects_Information _Semaphore_Information
The Classic Semaphore objects information.
Objects_Id
uint32_t Objects_Id
Definition
object.h:101
mrsp.h
This header file provides interfaces of the Multiprocessor Resource Sharing Protocol (MrsP) which are...
object.h
This header file provides interfaces of the Object Handler which are used by the implementation and t...
sem.h
This header file defines the Semaphore Manager API.
CORE_ceiling_mutex_Control
The recursive mutex control with priority ceiling protocol support.
Definition
coremutex.h:101
CORE_semaphore_Control
Definition
coresem.h:64
Objects_Control
Definition
objectdata.h:61
Objects_Information
The information structure used to manage each API class of objects.
Definition
objectdata.h:198
Semaphore_Control
Definition
semdata.h:60
Semaphore_Control::Object
Objects_Control Object
The object management portion of a semaphore instance.
Definition
semdata.h:70
Thread_queue_Control
Definition
threadq.h:609
Semaphore_Control::[union].Core_control::Wait_queue
Thread_queue_Control Wait_queue
The thread queue present in all other variants.
Semaphore_Control::[union].Core_control::Mutex
CORE_ceiling_mutex_Control Mutex
Semaphore_Control::[union].Core_control::Semaphore
CORE_semaphore_Control Semaphore
Generated by
1.18.0