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
CORE Mutex Implementation.
Chain_Node * previous
Definition: chain.h:72
Thread queue context for the thread queue methods.
Definition: threadq.h:198
Definitions for Multiprocessor Resource Sharing Protocol (MrsP) Implementation.
Classic Semaphore Manager Data Structures.
Objects_Control Object
The object management portion of a semaphore instance.
Definition: semdata.h:50
RTEMS_INLINE_ROUTINE Semaphore_Control * _Semaphore_Allocate(void)
Allocates a semaphore control block from the inactive chain of free semaphore control blocks.
Definition: semimpl.h:144
Objects_Control * _Objects_Allocate(Objects_Information *information)
Allocates an object.
Definition: objectallocate.c:42
Thread queue operations.
Definition: threadq.h:517
Chain_Node Node
Definition: objectdata.h:41
Thread_queue_Lock_context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:203
RTEMS_INLINE_ROUTINE void _Objects_Free(Objects_Information *information, Objects_Control *the_object)
Frees an object.
Definition: objectimpl.h:930
RTEMS_INLINE_ROUTINE void _Semaphore_Free(Semaphore_Control *the_semaphore)
Frees a semaphore control block to the inactive chain of free semaphore control blocks.
Definition: semimpl.h:156
RTEMS_INLINE_ROUTINE void _Thread_queue_Context_initialize(Thread_queue_Context *queue_context)
Initializes a thread queue context.
Definition: threadqimpl.h:152
uint32_t Objects_Id
Definition: object.h:80
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.
Definition: objectgetlocal.c:28
ISR_lock_Context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:130
RTEMS_INLINE_ROUTINE bool _Chain_Is_node_off_chain(const Chain_Node *node)
Checks if the node is off chain.
Definition: chainimpl.h:142
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
Semaphore_Variant
Classic semaphore variants.
Definition: semimpl.h:42
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
Definition: assert.h:100