RTEMS  5.0.0
Files | Data Structures | Macros | Functions
Mutex Handler

Files

file  coremuteximpl.h
 CORE Mutex Implementation.
 
file  coremutexseize.c
 Seize Mutex with Blocking.
 

Data Structures

struct  CORE_mutex_Control
 Control block used to manage each mutex. More...
 
struct  CORE_recursive_mutex_Control
 The recursive mutex control. More...
 
struct  CORE_ceiling_mutex_Control
 The recursive mutex control with priority ceiling protocol support. More...
 

Macros

#define CORE_MUTEX_TQ_OPERATIONS   &_Thread_queue_Operations_priority
 
#define CORE_MUTEX_TQ_PRIORITY_INHERIT_OPERATIONS   &_Thread_queue_Operations_priority_inherit
 

Functions

RTEMS_INLINE_ROUTINE void _CORE_mutex_Initialize (CORE_mutex_Control *the_mutex)
 
RTEMS_INLINE_ROUTINE void _CORE_mutex_Destroy (CORE_mutex_Control *the_mutex)
 
RTEMS_INLINE_ROUTINE void _CORE_mutex_Acquire_critical (CORE_mutex_Control *the_mutex, Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE void _CORE_mutex_Release (CORE_mutex_Control *the_mutex, Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE Thread_Control_CORE_mutex_Get_owner (const CORE_mutex_Control *the_mutex)
 
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_locked (const CORE_mutex_Control *the_mutex)
 Is mutex locked. More...
 
Status_Control _CORE_mutex_Seize_slow (CORE_mutex_Control *the_mutex, const Thread_queue_Operations *operations, Thread_Control *executing, bool wait, Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE void _CORE_mutex_Set_owner (CORE_mutex_Control *the_mutex, Thread_Control *owner)
 
RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_owner (const CORE_mutex_Control *the_mutex, const Thread_Control *the_thread)
 
RTEMS_INLINE_ROUTINE void _CORE_recursive_mutex_Initialize (CORE_recursive_mutex_Control *the_mutex)
 
RTEMS_INLINE_ROUTINE Status_Control _CORE_recursive_mutex_Seize_nested (CORE_recursive_mutex_Control *the_mutex)
 
RTEMS_INLINE_ROUTINE Status_Control _CORE_recursive_mutex_Seize (CORE_recursive_mutex_Control *the_mutex, const Thread_queue_Operations *operations, Thread_Control *executing, bool wait, Status_Control(*nested)(CORE_recursive_mutex_Control *), Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE Status_Control _CORE_recursive_mutex_Surrender (CORE_recursive_mutex_Control *the_mutex, const Thread_queue_Operations *operations, Thread_Control *executing, Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE void _CORE_ceiling_mutex_Initialize (CORE_ceiling_mutex_Control *the_mutex, const Scheduler_Control *scheduler, Priority_Control priority_ceiling)
 
RTEMS_INLINE_ROUTINE const Scheduler_Control_CORE_ceiling_mutex_Get_scheduler (const CORE_ceiling_mutex_Control *the_mutex)
 
RTEMS_INLINE_ROUTINE void _CORE_ceiling_mutex_Set_priority (CORE_ceiling_mutex_Control *the_mutex, Priority_Control priority_ceiling, Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE Priority_Control _CORE_ceiling_mutex_Get_priority (const CORE_ceiling_mutex_Control *the_mutex)
 
RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Set_owner (CORE_ceiling_mutex_Control *the_mutex, Thread_Control *owner, Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Seize (CORE_ceiling_mutex_Control *the_mutex, Thread_Control *executing, bool wait, Status_Control(*nested)(CORE_recursive_mutex_Control *), Thread_queue_Context *queue_context)
 
RTEMS_INLINE_ROUTINE Status_Control _CORE_ceiling_mutex_Surrender (CORE_ceiling_mutex_Control *the_mutex, Thread_Control *executing, Thread_queue_Context *queue_context)
 

Detailed Description

This handler encapsulates functionality which provides the foundation Mutex services used in all of the APIs supported by RTEMS.

Function Documentation

◆ _CORE_mutex_Is_locked()

RTEMS_INLINE_ROUTINE bool _CORE_mutex_Is_locked ( const CORE_mutex_Control the_mutex)

Is mutex locked.

This routine returns true if the mutex specified is locked and false otherwise.

Parameters
[in]the_mutexis the mutex to check.
Return values
trueThe mutex is locked.
falseThe mutex is not locked.