RTEMS
Files | Classes | Macros | Enumerations | Functions | Variables
Semaphore Manager Implementation

Files

file  semdata.h
 Classic Semaphore Manager Data Structures.
 
file  semimpl.h
 Classic Semaphore Manager Implementation.
 
file  semident.c
 rtems_semaphore_ident() Implementation
 

Classes

struct  Semaphore_Control
 

Macros

#define SEMAPHORE_INFORMATION_DEFINE(max, scheduler_count)
 Macro to define the objects information for the Classic Semaphore objects. More...
 

Enumerations

enum  Semaphore_Variant {
  SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY, SEMAPHORE_VARIANT_MUTEX_PRIORITY_CEILING, SEMAPHORE_VARIANT_MUTEX_NO_PROTOCOL, SEMAPHORE_VARIANT_SIMPLE_BINARY,
  SEMAPHORE_VARIANT_COUNTING, SEMAPHORE_VARIANT_MRSP
}
 Classic semaphore variants. More...
 
enum  Semaphore_Discipline { SEMAPHORE_DISCIPLINE_PRIORITY, SEMAPHORE_DISCIPLINE_FIFO }
 

Functions

static __inline__ uintptr_t _Semaphore_Get_flags (const Semaphore_Control *the_semaphore)
 
static __inline__ void _Semaphore_Set_flags (Semaphore_Control *the_semaphore, uintptr_t flags)
 
static __inline__ Semaphore_Variant _Semaphore_Get_variant (uintptr_t flags)
 
static __inline__ uintptr_t _Semaphore_Set_variant (uintptr_t flags, Semaphore_Variant variant)
 
static __inline__ Semaphore_Discipline _Semaphore_Get_discipline (uintptr_t flags)
 
static __inline__ uintptr_t _Semaphore_Set_discipline (uintptr_t flags, Semaphore_Discipline discipline)
 
static __inline__ const Thread_queue_Operations_Semaphore_Get_operations (uintptr_t flags)
 
static __inline__ Semaphore_Control_Semaphore_Allocate (void)
 Allocates a semaphore control block from the inactive chain of free semaphore control blocks. More...
 
static __inline__ void _Semaphore_Free (Semaphore_Control *the_semaphore)
 Frees a semaphore control block to the inactive chain of free semaphore control blocks. More...
 
static __inline__ Semaphore_Control_Semaphore_Get (Objects_Id id, Thread_queue_Context *queue_context)
 

Variables

Objects_Information _Semaphore_Information
 The Classic Semaphore objects information.
 

Detailed Description

Macro Definition Documentation

◆ SEMAPHORE_INFORMATION_DEFINE

#define SEMAPHORE_INFORMATION_DEFINE (   max,
  scheduler_count 
)
Value:
typedef union { \
Objects_Control Object; \
Semaphore_Control Semaphore; \
struct { \
Objects_Control Object; \
MRSP_Control Control; \
Priority_Control ceiling_priorities[ scheduler_count ]; \
} MRSP; \
} Semaphore_Configured_control; \
OBJECTS_INFORMATION_DEFINE( \
_Semaphore, \
OBJECTS_CLASSIC_API, \
OBJECTS_RTEMS_SEMAPHORES, \
Semaphore_Configured_control, \
max, \
_Semaphore_MP_Send_extract_proxy \
)
#define OBJECTS_NO_STRING_NAME
Constant for the object information string name length to indicate that this object class has no stri...
Definition: objectdata.h:101

Macro to define the objects information for the Classic Semaphore objects.

This macro should only be used by <rtems/confdefs.h>.

Parameters
maxThe configured object maximum (the OBJECTS_UNLIMITED_OBJECTS flag may be set).
scheduler_countThe configured scheduler count (only used in SMP configurations).

Definition at line 116 of file semdata.h.

Enumeration Type Documentation

◆ Semaphore_Variant

Classic semaphore variants.

Must be in synchronization with Semaphore_Control::variant.

Definition at line 42 of file semimpl.h.

Function Documentation

◆ _Semaphore_Allocate()

static __inline__ Semaphore_Control* _Semaphore_Allocate ( void  )
static

Allocates a semaphore control block from the inactive chain of free semaphore control blocks.

This function allocates a semaphore control block from the inactive chain of free semaphore control blocks.

Definition at line 144 of file semimpl.h.

◆ _Semaphore_Free()

static __inline__ void _Semaphore_Free ( Semaphore_Control the_semaphore)
static

Frees a semaphore control block to the inactive chain of free semaphore control blocks.

This routine frees a semaphore control block to the inactive chain of free semaphore control blocks.

Definition at line 156 of file semimpl.h.