28 #if defined(RTEMS_SMP) 63 variant = _Semaphore_Get_variant( _Semaphore_Get_flags( the_semaphore ) );
66 case SEMAPHORE_VARIANT_MUTEX_PRIORITY_CEILING:
67 sc = _Semaphore_Is_scheduler_valid(
85 #if defined(RTEMS_SMP) 86 case SEMAPHORE_VARIANT_MRSP:
105 variant == SEMAPHORE_VARIANT_MUTEX_INHERIT_PRIORITY
106 || variant == SEMAPHORE_VARIANT_MUTEX_NO_PROTOCOL
107 || variant == SEMAPHORE_VARIANT_SIMPLE_BINARY
108 || variant == SEMAPHORE_VARIANT_COUNTING
138 if ( old_priority == NULL ) {
143 if ( scheduler == NULL ) {
147 the_semaphore = _Semaphore_Get( semaphore_id, &queue_context );
149 if ( the_semaphore == NULL ) {
150 #if defined(RTEMS_MULTIPROCESSING) 151 if ( _Semaphore_MP_Is_remote( semaphore_id ) ) {
159 return _Semaphore_Set_priority(
static __inline__ void _Thread_queue_Acquire_critical(Thread_queue_Control *the_thread_queue, Thread_queue_Context *queue_context)
Acquires the thread queue control in a critical section.
rtems_status_code rtems_semaphore_set_priority(rtems_id semaphore_id, rtems_id scheduler_id, rtems_task_priority new_priority, rtems_task_priority *old_priority)
%
#define RTEMS_CURRENT_PRIORITY
This constant is passed to {set-priority:/name}() when the caller wants to obtain the current priorit...
static __inline__ Priority_Control _RTEMS_Priority_To_core(const Scheduler_Control *scheduler, rtems_task_priority priority, bool *valid)
Converts the RTEMS API priority to the corresponding SuperCore priority and validates it...
uint64_t Priority_Control
The thread priority control.
This status code indicates that an invalid thread priority was provided.
static __inline__ void _CORE_ceiling_mutex_Set_priority(CORE_ceiling_mutex_Control *the_mutex, Priority_Control priority_ceiling, Thread_queue_Context *queue_context)
Sets the priority of the ceiling mutex.
static __inline__ Per_CPU_Control * _Thread_queue_Dispatch_disable(Thread_queue_Context *queue_context)
Disables dispatching in a critical section.
Thread queue context for the thread queue methods.
CORE_ceiling_mutex_Control Mutex
Inlined Routines Associated with the Manipulation of the Scheduler.
Thread_queue_Control Wait_queue
The thread queue present in all other variants.
#define _ISR_lock_ISR_enable(_context)
Restores the saved interrupt state of the ISR lock context.
static __inline__ const Scheduler_Control * _CORE_ceiling_mutex_Get_scheduler(const CORE_ceiling_mutex_Control *the_mutex)
Gets the scheduler of the ceiling mutex.
static __inline__ Priority_Control _MRSP_Get_priority(const MRSP_Control *mrsp, const Scheduler_Control *scheduler)
Gets priority of the MrsP control.
uint32_t rtems_task_priority
%
This status code indicates successful completion.
Classic Semaphore Manager Implementation.
rtems_status_code
This enumeration provides status codes for directives of the Classic API.
Thread_queue_Lock_context Lock_context
The lock context for the thread queue acquire and release operations.
static __inline__ Priority_Control _CORE_ceiling_mutex_Get_priority(const CORE_ceiling_mutex_Control *the_mutex)
Gets the priority of the ceiling mutex.
void _Thread_Priority_update(Thread_queue_Context *queue_context)
Updates the priority of all threads in the set.
void _Thread_Dispatch_enable(Per_CPU_Control *cpu_self)
Enables thread dispatching.
static __inline__ void _Thread_queue_Context_clear_priority_updates(Thread_queue_Context *queue_context)
Clears the priority update count of the thread queue context.
This status code indicates that a specified address was invalid.
This status code indicates that the item has not been initialized.
This status code indicates that an object identifier was invalid.
Objects_Id rtems_id
Values of this type identify an RTEMS object.
This status code indicates that the operation was illegal on a remote object.
static __inline__ rtems_task_priority _RTEMS_Priority_From_core(const Scheduler_Control *scheduler, Priority_Control priority)
Converts the SuperCore priority to the corresponding RTEMS API priority.
static __inline__ void _MRSP_Set_priority(MRSP_Control *mrsp, const Scheduler_Control *scheduler, Priority_Control new_priority)
Sets priority of the MrsP control.
The recursive mutex control with priority ceiling protocol support.
ISR_lock_Context Lock_context
The lock context for the thread queue acquire and release operations.
void _Thread_queue_Release(Thread_queue_Control *the_thread_queue, Thread_queue_Context *queue_context)
Releases the thread queue control and enables interrupts.
union Semaphore_Control::@8 Core_control
Semaphore_Variant
Classic semaphore variants.
static __inline__ const Scheduler_Control * _Scheduler_Get_by_id(Objects_Id id)
Gets the scheduler from the given object build id.
#define _Assert(_e)
Assertion similar to assert() controlled via RTEMS_DEBUG instead of NDEBUG.
Classic Tasks Manager Implementation.