The friendly Operating System for the Internet of Things
mutex.h File Reference

RIOT synchronization API. More...

Detailed Description

Author
Kaspar Schleiser kaspa.nosp@m.r@sc.nosp@m.hleis.nosp@m.er.d.nosp@m.e

Definition in file mutex.h.

#include <stddef.h>
#include "list.h"
+ Include dependency graph for mutex.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  mutex_t
 Mutex structure. More...
 

Macros

#define MUTEX_INIT   { { NULL } }
 Static initializer for mutex_t. More...
 
#define MUTEX_INIT_LOCKED   { { MUTEX_LOCKED } }
 Static initializer for mutex_t with a locked mutex.
 

Functions

static void mutex_init (mutex_t *mutex)
 Initializes a mutex object. More...
 
int _mutex_lock (mutex_t *mutex, int blocking)
 Lock a mutex, blocking or non-blocking. More...
 
static int mutex_trylock (mutex_t *mutex)
 Tries to get a mutex, non-blocking. More...
 
static void mutex_lock (mutex_t *mutex)
 Locks a mutex, blocking. More...
 
void mutex_unlock (mutex_t *mutex)
 Unlocks the mutex. More...
 
void mutex_unlock_and_sleep (mutex_t *mutex)
 Unlocks the mutex and sends the current thread to sleep. More...