38#ifndef _RTEMS_SCORE_CORERWLOCKIMPL_H
39#define _RTEMS_SCORE_CORERWLOCKIMPL_H
61#define CORE_RWLOCK_TQ_OPERATIONS &_Thread_queue_Operations_FIFO
67#define CORE_RWLOCK_THREAD_WAITING_FOR_READ 0
73#define CORE_RWLOCK_THREAD_WAITING_FOR_WRITE 1
127static inline void _CORE_RWLock_Destroy(
150 _Thread_queue_Context_ISR_disable( queue_context, level );
151 _Thread_queue_Context_set_ISR_level( queue_context, level );
152 executing = _Thread_Executing;
153 _Thread_queue_Queue_acquire_critical(
154 &the_rwlock->
Queue.Queue,
155 &executing->Potpourri_stats,
168static inline void _CORE_RWLock_Release(
173 _Thread_queue_Queue_release(
174 &the_rwlock->
Queue.Queue,
This header file provides interfaces of the Watchdog Handler which are used by the implementation and...
uint32_t ISR_Level
Definition: isrlevel.h:60
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:48
Status_Control _CORE_RWLock_Surrender(CORE_RWLock_Control *the_rwlock)
Releases the RWLock.
Definition: corerwlockrelease.c:96
CORE_RWLock_States
Definition: corerwlockimpl.h:78
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:48
void _CORE_RWLock_Initialize(CORE_RWLock_Control *the_rwlock)
Initializes a RWlock.
Definition: corerwlock.c:45
@ CORE_RWLOCK_UNLOCKED
Definition: corerwlockimpl.h:81
@ CORE_RWLOCK_LOCKED_FOR_READING
Definition: corerwlockimpl.h:84
@ CORE_RWLOCK_LOCKED_FOR_WRITING
Definition: corerwlockimpl.h:87
Status_Control
Status codes.
Definition: status.h:111
This header file provides the interfaces of the Per-CPU Information.
This header file provides the interfaces of the Operation Status Support.
This header file provides interfaces of the Thread Handler which are used by the implementation and t...
Definition: corerwlockimpl.h:94
Thread_queue_Syslock_queue Queue
Definition: corerwlockimpl.h:98
unsigned int number_of_readers
Definition: corerwlockimpl.h:106
CORE_RWLock_States current_state
Definition: corerwlockimpl.h:102
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
Thread queue with a layout compatible to struct _Thread_queue_Queue defined in Newlib <sys/lock....
Definition: threadqimpl.h:71
This header file provides interfaces of the Thread Queue Handler which are only used by the implement...