37#ifndef _RTEMS_RTEMS_SEMIMPL_H
38#define _RTEMS_RTEMS_SEMIMPL_H
65 SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY,
66 SEMAPHORE_VARIANT_MUTEX_PRIORITY_CEILING,
67 SEMAPHORE_VARIANT_MUTEX_NO_PROTOCOL,
68 SEMAPHORE_VARIANT_SIMPLE_BINARY,
69 SEMAPHORE_VARIANT_COUNTING
72 SEMAPHORE_VARIANT_MRSP
77 SEMAPHORE_DISCIPLINE_PRIORITY,
78 SEMAPHORE_DISCIPLINE_FIFO
79} Semaphore_Discipline;
81static inline uintptr_t _Semaphore_Get_flags(
89static inline void _Semaphore_Set_flags(
105static inline uintptr_t _Semaphore_Set_variant(
110 return flags | variant;
113static inline Semaphore_Discipline _Semaphore_Get_discipline(
117 return (Semaphore_Discipline) ( ( flags >> 3 ) & 0x1 );
120static inline uintptr_t _Semaphore_Set_discipline(
122 Semaphore_Discipline discipline
125 return flags | ( discipline << 3 );
128#if defined(RTEMS_MULTIPROCESSING)
129static inline bool _Semaphore_Is_global(
133 return ( flags & 0x10 ) != 0;
136static inline uintptr_t _Semaphore_Make_global( uintptr_t flags )
147 _Semaphore_Get_variant( flags ) == SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY
152 if ( _Semaphore_Get_discipline( flags ) == SEMAPHORE_DISCIPLINE_PRIORITY ) {
178static inline void _Semaphore_Free (
190 _Thread_queue_Context_initialize( queue_context );
204#ifdef RTEMS_MULTIPROCESSING
This header file provides interfaces of the Mutex Handler which are only used by the implementation.
This header file provides interfaces of the Semaphore Handler which are only used by the implementati...
Objects_Information _Semaphore_Information
The Classic Semaphore objects information.
Semaphore_Variant
Classic semaphore variants.
Definition: semimpl.h:64
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG and static analysis runs.
Definition: assert.h:96
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:43
uint32_t Objects_Id
Definition: object.h:101
Objects_Control * _Objects_Get(Objects_Id id, ISR_lock_Context *lock_context, const Objects_Information *information)
Maps the specified object identifier to the associated local object control block.
Definition: objectgetlocal.c:43
const Thread_queue_Operations _Thread_queue_Operations_priority
The FIFO thread queue operations are used when a thread is enqueued on a thread queue and provide pri...
Definition: threadqops.c:1517
const Thread_queue_Operations _Thread_queue_Operations_FIFO
The FIFO thread queue operations are used when a thread is enqueued on a thread queue and provide FIF...
Definition: threadqops.c:1509
const Thread_queue_Operations _Thread_queue_Operations_priority_inherit
The FIFO thread queue operations are used when a thread is enqueued on a thread queue and provide pri...
Definition: threadqops.c:1525
This header file provides interfaces of the Multiprocessor Resource Sharing Protocol (MrsP) which are...
This header file provides data structures used by the implementation and the Application Configuratio...
This header file provides the implementation interfaces of the Semaphore Manager Multiprocessing (MP)...
This structure represents a chain node.
Definition: chain.h:78
struct Chain_Node * previous
Definition: chain.h:82
Chain_Node Node
Definition: objectdata.h:63
Objects_Control Object
The object management portion of a semaphore instance.
Definition: semdata.h:70
Thread queue context for the thread queue methods.
Definition: threadq.h:216
Thread_queue_Lock_context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:221
ISR_lock_Context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:148
The thread queue operations are used to manage the threads of a thread queue.
Definition: threadq.h:554