21 #ifndef _RTEMS_SCORE_CORERWLOCKIMPL_H 22 #define _RTEMS_SCORE_CORERWLOCKIMPL_H 25 #include <rtems/score/status.h> 43 #define CORE_RWLOCK_TQ_OPERATIONS &_Thread_queue_Operations_FIFO 49 #define CORE_RWLOCK_THREAD_WAITING_FOR_READ 0 55 #define CORE_RWLOCK_THREAD_WAITING_FOR_WRITE 1 132 _Thread_queue_Context_ISR_disable( queue_context, level );
134 executing = _Thread_Executing;
135 _Thread_queue_Queue_acquire_critical(
136 &the_rwlock->
Queue.Queue,
137 &executing->Potpourri_stats,
156 &the_rwlock->
Queue.Queue,
Definition: corerwlockimpl.h:76
Thread queue context for the thread queue methods.
Definition: threadq.h:198
Status_Control _CORE_RWLock_Surrender(CORE_RWLock_Control *the_rwlock)
Releases the RWLock.
Definition: corerwlockrelease.c:76
unsigned int number_of_readers
Definition: corerwlockimpl.h:88
Status_Control _CORE_RWLock_Seize_for_reading(CORE_RWLock_Control *the_rwlock, bool wait, Thread_queue_Context *queue_context)
Obtains RWLock for reading.
Definition: corerwlockobtainread.c:28
CORE_RWLock_States current_state
Definition: corerwlockimpl.h:84
Thread_queue_Syslock_queue Queue
Definition: corerwlockimpl.h:80
Definition: corerwlockimpl.h:69
CORE_RWLock_States
Definition: corerwlockimpl.h:60
Status_Control _CORE_RWLock_Seize_for_writing(CORE_RWLock_Control *the_rwlock, bool wait, Thread_queue_Context *queue_context)
Obtains RWLock for writing.
Definition: corerwlockobtainwrite.c:28
Thread queue with a layout compatible to struct _Thread_queue_Queue defined in Newlib <sys/lock....
Definition: threadqimpl.h:54
uint32_t ISR_Level
Definition: isrlevel.h:41
Definition: corerwlockimpl.h:63
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 _CORE_RWLock_Release(CORE_RWLock_Control *the_rwlock, Thread_queue_Context *queue_context)
Releases the RWlock.
Definition: corerwlockimpl.h:150
Constants and Structures Associated with the Manipulation of Objects.
RTEMS_INLINE_ROUTINE void _Thread_queue_Context_set_ISR_level(Thread_queue_Context *queue_context, ISR_Level level)
Sets the thread queue context ISR level.
Definition: threadqimpl.h:411
Constants and Structures Associated with Watchdog Timers.
ISR_lock_Context Lock_context
The lock context for the thread queue acquire and release operations.
Definition: threadq.h:130
Definition: corerwlockimpl.h:66
#define RTEMS_INLINE_ROUTINE
Definition: basedefs.h:66
Constants and Structures Related with the Thread Control Block.
RTEMS_INLINE_ROUTINE void _CORE_RWLock_Destroy(CORE_RWLock_Control *the_rwlock)
Destroys a RWlock.
Definition: corerwlockimpl.h:109
RTEMS_INLINE_ROUTINE void _Thread_queue_Queue_release(Thread_queue_Queue *queue, ISR_lock_Context *lock_context)
Releases the thread queue queue and enables interrupts.
Definition: threadqimpl.h:625
void _CORE_RWLock_Initialize(CORE_RWLock_Control *the_rwlock)
Initializes a RWlock.
Definition: corerwlock.c:25
RTEMS_INLINE_ROUTINE Thread_Control * _CORE_RWLock_Acquire(CORE_RWLock_Control *the_rwlock, Thread_queue_Context *queue_context)
Acquires the RWlock.
Definition: corerwlockimpl.h:124