RTEMS: cpukit/include/rtems/rtems/semdata.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
semdata.h
Go to the documentation of this file.
1
9/*
10 * COPYRIGHT (c) 1989-2008, 2016.
11 * On-Line Applications Research Corporation (OAR).
12 *
13 * The license and distribution terms for this file may be
14 * found in the file LICENSE in this distribution or at
15 * http://www.rtems.org/license/LICENSE.
16 */
17
18#ifndef _RTEMS_RTEMS_SEMDATA_H
19#define _RTEMS_RTEMS_SEMDATA_H
20
21#include <rtems/rtems/sem.h>
22#include <rtems/score/coremutex.h>
23#include <rtems/score/coresem.h>
24#include <rtems/score/mrsp.h>
25#include <rtems/score/object.h>
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
40 typedef struct {
50 Objects_Control Object;
51
61 union {
65 Thread_queue_Control Wait_queue;
66
71 CORE_ceiling_mutex_Control Mutex;
72
77 CORE_semaphore_Control Semaphore;
78
79#if defined(RTEMS_SMP)
80 MRSP_Control MRSP;
81#endif
82 } Core_control;
83} Semaphore_Control;
84
88extern Objects_Information _Semaphore_Information;
89
90#if defined(RTEMS_MULTIPROCESSING)
98void _Semaphore_MP_Send_extract_proxy (
99 Thread_Control *the_thread,
100 Objects_Id id
101);
102#endif
103
115#if defined(RTEMS_SMP)
116#define SEMAPHORE_INFORMATION_DEFINE( max, scheduler_count ) \
117 typedef union { \
118 Objects_Control Object; \
119 Semaphore_Control Semaphore; \
120 struct { \
121 Objects_Control Object; \
122 MRSP_Control Control; \
123 Priority_Control ceiling_priorities[ scheduler_count ]; \
124 } MRSP; \
125 } Semaphore_Configured_control; \
126 OBJECTS_INFORMATION_DEFINE( \
127 _Semaphore, \
128 OBJECTS_CLASSIC_API, \
129 OBJECTS_RTEMS_SEMAPHORES, \
130 Semaphore_Configured_control, \
131 max, \
132 OBJECTS_NO_STRING_NAME, \
133 _Semaphore_MP_Send_extract_proxy \
134 )
135#else
136#define SEMAPHORE_INFORMATION_DEFINE( max, scheduler_count ) \
137 OBJECTS_INFORMATION_DEFINE( \
138 _Semaphore, \
139 OBJECTS_CLASSIC_API, \
140 OBJECTS_RTEMS_SEMAPHORES, \
141 Semaphore_Control, \
142 max, \
143 OBJECTS_NO_STRING_NAME, \
144 _Semaphore_MP_Send_extract_proxy \
145 )
146#endif
147
150#ifdef __cplusplus
151}
152#endif
153
154#endif
155/* end of include file */
coremutex.h
CORE Mutex API.
coresem.h
Data Associated with the Counting Semaphore Handler.
_Semaphore_Information
Objects_Information _Semaphore_Information
The Classic Semaphore objects information.
Objects_Id
uint32_t Objects_Id
Definition: object.h:80
mrsp.h
Definitions for Multiprocessor Resource Sharing Protocol (MrsP).
object.h
Constants and Structures Associated with the Object Handler.
sem.h
Classic Semaphores Manager API.
CORE_ceiling_mutex_Control
The recursive mutex control with priority ceiling protocol support.
Definition: coremutex.h:83
CORE_semaphore_Control
Definition: coresem.h:48
Objects_Control
Definition: objectdata.h:39
Objects_Information
The information structure used to manage each API class of objects.
Definition: objectdata.h:176
Semaphore_Control
Definition: semdata.h:40
Semaphore_Control::Wait_queue
Thread_queue_Control Wait_queue
The thread queue present in all other variants.
Definition: semdata.h:65
Semaphore_Control::Object
Objects_Control Object
The object management portion of a semaphore instance.
Definition: semdata.h:50
Semaphore_Control::Semaphore
CORE_semaphore_Control Semaphore
Definition: semdata.h:77
Semaphore_Control::Mutex
CORE_ceiling_mutex_Control Mutex
Definition: semdata.h:71
Thread_queue_Control
Definition: threadq.h:553
_Thread_Control
Definition: thread.h:732