17 #ifndef _RTEMS_RTEMS_SEMIMPL_H 18 #define _RTEMS_RTEMS_SEMIMPL_H 43 SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY,
44 SEMAPHORE_VARIANT_MUTEX_PRIORITY_CEILING,
45 SEMAPHORE_VARIANT_MUTEX_NO_PROTOCOL,
46 SEMAPHORE_VARIANT_SIMPLE_BINARY,
47 SEMAPHORE_VARIANT_COUNTING
48 #if defined(RTEMS_SMP) 50 SEMAPHORE_VARIANT_MRSP
55 SEMAPHORE_DISCIPLINE_PRIORITY,
56 SEMAPHORE_DISCIPLINE_FIFO
57 } Semaphore_Discipline;
80 return (Semaphore_Discipline) ( flags & 0x7 );
88 return flags | variant;
95 return (Semaphore_Discipline) ( ( flags >> 3 ) & 0x1 );
100 Semaphore_Discipline discipline
103 return flags | ( discipline << 3 );
106 #if defined(RTEMS_MULTIPROCESSING) 111 return ( flags & 0x10 ) != 0;
125 _Semaphore_Get_variant( flags ) == SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY
127 return &_Thread_queue_Operations_priority_inherit;
130 if ( _Semaphore_Get_discipline( flags ) == SEMAPHORE_DISCIPLINE_PRIORITY ) {
131 return &_Thread_queue_Operations_priority;
134 return &_Thread_queue_Operations_FIFO;
182 #ifdef RTEMS_MULTIPROCESSING 183 #include <rtems/rtems/semmp.h>
CORE Mutex Implementation.
static __inline__ Semaphore_Control * _Semaphore_Allocate(void)
Allocates a semaphore control block from the inactive chain of free semaphore control blocks...
Thread queue context for the thread queue methods.
static __inline__ bool _Chain_Is_node_off_chain(const Chain_Node *node)
Checks if the node is off chain.
static __inline__ void _Thread_queue_Context_initialize(Thread_queue_Context *queue_context)
Initializes a thread queue context.
Definitions for Multiprocessor Resource Sharing Protocol (MrsP) Implementation.
Classic Semaphore Manager Data Structures.
Objects_Control Object
The object management portion of a semaphore instance.
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Thread_queue_Lock_context Lock_context
The lock context for the thread queue acquire and release operations.
static __inline__ void _Semaphore_Free(Semaphore_Control *the_semaphore)
Frees a semaphore control block to the inactive chain of free semaphore control blocks.
Inlined Routines Associated with the SuperCore Semaphore.
Objects_Information _Semaphore_Information
The Classic Semaphore objects information.
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.
ISR_lock_Context Lock_context
The lock context for the thread queue acquire and release operations.
#define RTEMS_INLINE_ROUTINE
Gives a hint to the compiler in a function declaration to inline this function.
Semaphore_Variant
Classic semaphore variants.
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
static __inline__ void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.