RTEMS CPU Kit with SuperCore  4.10.99.0
Data Structures | Defines | Typedefs | Enumerations | Functions
rtems/score/coremutex.h File Reference

Constants and Structures Associated with the Mutex Handler. More...

#include <rtems/score/thread.h>
#include <rtems/score/threadq.h>
#include <rtems/score/priority.h>
#include <rtems/score/watchdog.h>
#include <rtems/score/interr.h>
#include <rtems/score/sysstate.h>
#include <rtems/score/coremutex.inl>
Include dependency graph for coremutex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CORE_mutex_Attributes
 The control block used to manage attributes of each mutex. More...
struct  CORE_mutex_Control
 Control block used to manage each mutex. More...

Defines

#define CORE_MUTEX_STATUS_LAST   CORE_MUTEX_STATUS_CEILING_VIOLATED
 The last status value.
#define CORE_MUTEX_UNLOCKED   1
 This is the value of a mutex when it is unlocked.
#define CORE_MUTEX_LOCKED   0
 This is the value of a mutex when it is locked.
#define _CORE_mutex_Seize_interrupt_trylock(_mutex, _level_p)   _CORE_mutex_Seize_interrupt_trylock_body( _mutex, _level_p )
 The default is to favor speed and inlining this definitely saves a few instructions.
#define _CORE_mutex_Check_dispatch_for_seize(_wait)   0
 Verifies that a mutex blocking seize is performed safely.
#define _CORE_mutex_Seize_body(_the_mutex, _id, _wait, _timeout, _level)
 Attempt to obtain the mutex.
#define _CORE_mutex_Seize(_the_mutex, _id, _wait, _timeout, _level)   _CORE_mutex_Seize_body( _the_mutex, _id, _wait, _timeout, _level )
 This method is used to obtain a core mutex.

Typedefs

typedef void(* CORE_mutex_API_mp_support_callout )(Thread_Control *, Objects_Id)
 Callout which provides to support global/multiprocessor operations.

Enumerations

enum  CORE_mutex_Disciplines { CORE_MUTEX_DISCIPLINES_FIFO, CORE_MUTEX_DISCIPLINES_PRIORITY, CORE_MUTEX_DISCIPLINES_PRIORITY_INHERIT, CORE_MUTEX_DISCIPLINES_PRIORITY_CEILING }
 The blocking disciplines for a mutex. More...
enum  CORE_mutex_Status {
  CORE_MUTEX_STATUS_SUCCESSFUL, CORE_MUTEX_STATUS_UNSATISFIED_NOWAIT, CORE_MUTEX_STATUS_NESTING_NOT_ALLOWED, CORE_MUTEX_STATUS_NOT_OWNER_OF_RESOURCE,
  CORE_MUTEX_WAS_DELETED, CORE_MUTEX_TIMEOUT, CORE_MUTEX_STATUS_CEILING_VIOLATED
}
 The possible Mutex handler return statuses. More...
enum  CORE_mutex_Nesting_behaviors { CORE_MUTEX_NESTING_ACQUIRES, CORE_MUTEX_NESTING_IS_ERROR, CORE_MUTEX_NESTING_BLOCKS }
 The possible behaviors for lock nesting. More...

Functions

CORE_mutex_Status _CORE_mutex_Initialize (CORE_mutex_Control *the_mutex, CORE_mutex_Attributes *the_mutex_attributes, uint32_t initial_lock)
 Initializes the mutex based on the parameters passed.
RTEMS_INLINE_ROUTINE int _CORE_mutex_Seize_interrupt_trylock_body (CORE_mutex_Control *the_mutex, ISR_Level *level_p)
 Attempt to receive a unit from the_mutex.
void _CORE_mutex_Seize_interrupt_blocking (CORE_mutex_Control *the_mutex, Watchdog_Interval timeout)
 Performs the blocking portion of a mutex obtain.
CORE_mutex_Status _CORE_mutex_Surrender (CORE_mutex_Control *the_mutex, Objects_Id id, CORE_mutex_API_mp_support_callout api_mutex_mp_support)
 Frees a unit to the mutex.
void _CORE_mutex_Flush (CORE_mutex_Control *the_mutex, Thread_queue_Flush_callout remote_extract_callout, uint32_t status)
 Flush all waiting threads.

Detailed Description

Constants and Structures Associated with the Mutex Handler.

This include file contains all the constants and structures associated with the Mutex Handler. A mutex is an enhanced version of the standard Dijkstra binary semaphore used to provide synchronization and mutual exclusion capabilities.