rmutex.h File Reference

Recursive Mutex for thread synchronization. More...

Detailed Description

Recursive Mutex for thread synchronization.

Author
Martin Elshuber marti.nosp@m.n.el.nosp@m.shube.nosp@m.r@th.nosp@m.eobro.nosp@m.ma-s.nosp@m.ystem.nosp@m.s.co.nosp@m.m

Definition in file rmutex.h.

#include <stdint.h>
#include <stdatomic.h>
#include "mutex.h"
#include "sched.h"
+ Include dependency graph for rmutex.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rmutex_t
 Mutex structure. More...
 

Macros

#define RMUTEX_INIT   { MUTEX_INIT, 0, ATOMIC_VAR_INIT(KERNEL_PID_UNDEF) }
 Static initializer for rmutex_t. More...
 

Typedefs

typedef struct rmutex_t rmutex_t
 Mutex structure. More...
 

Functions

static void rmutex_init (rmutex_t *rmutex)
 Initializes a recursive mutex object. More...
 
int rmutex_trylock (rmutex_t *rmutex)
 Tries to get a recursive mutex, non-blocking. More...
 
void rmutex_lock (rmutex_t *rmutex)
 Locks a recursive mutex, blocking. More...
 
void rmutex_unlock (rmutex_t *rmutex)
 Unlocks the recursive mutex. More...