ChibiOS/RT  5.1.0
chmtx.h File Reference

Mutexes macros and structures. More...

Go to the source code of this file.

Data Structures

struct  ch_mutex
 Mutex structure. More...
 

Macros

#define _MUTEX_DATA(name)   {_THREADS_QUEUE_DATA(name.queue), NULL, NULL, 0}
 Data part of a static mutex initializer. More...
 
#define MUTEX_DECL(name)   mutex_t name = _MUTEX_DATA(name)
 Static mutex initializer. More...
 

Typedefs

typedef struct ch_mutex mutex_t
 Type of a mutex structure. More...
 

Functions

void chMtxObjectInit (mutex_t *mp)
 Initializes s mutex_t structure. More...
 
void chMtxLock (mutex_t *mp)
 Locks the specified mutex. More...
 
void chMtxLockS (mutex_t *mp)
 Locks the specified mutex. More...
 
bool chMtxTryLock (mutex_t *mp)
 Tries to lock a mutex. More...
 
bool chMtxTryLockS (mutex_t *mp)
 Tries to lock a mutex. More...
 
void chMtxUnlock (mutex_t *mp)
 Unlocks the specified mutex. More...
 
void chMtxUnlockS (mutex_t *mp)
 Unlocks the specified mutex. More...
 
void chMtxUnlockAll (void)
 Unlocks all mutexes owned by the invoking thread. More...
 
void chMtxUnlockAllS (void)
 Unlocks all mutexes owned by the invoking thread. More...
 
static bool chMtxQueueNotEmptyS (mutex_t *mp)
 Returns true if the mutex queue contains at least a waiting thread. More...
 
static mutex_tchMtxGetNextMutexS (void)
 Returns the next mutex in the mutexes stack of the current thread. More...
 

Detailed Description

Mutexes macros and structures.

Definition in file chmtx.h.