libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
|
#include "common.h"
Go to the source code of this file.
Macros | |
#define | MUTEX_UNLOCKED 0 |
#define | MUTEX_LOCKED 1 |
Typedefs | |
typedef uint32_t | mutex_t |
Functions | |
void | __dmb (void) |
uint32_t | __ldrex (volatile uint32_t *addr) |
uint32_t | __strex (uint32_t val, volatile uint32_t *addr) |
void | mutex_lock (mutex_t *m) |
uint32_t | mutex_trylock (mutex_t *m) |
void | mutex_unlock (mutex_t *m) |
void __dmb | ( | void | ) |
Definition at line 23 of file sync.c.
Referenced by mutex_trylock(), and mutex_unlock().
uint32_t __ldrex | ( | volatile uint32_t * | addr | ) |
Definition at line 31 of file sync.c.
Referenced by mutex_trylock().
uint32_t __strex | ( | uint32_t | val, |
volatile uint32_t * | addr | ||
) |
Definition at line 38 of file sync.c.
Referenced by mutex_trylock().
void mutex_lock | ( | mutex_t * | m | ) |
Definition at line 46 of file sync.c.
References mutex_trylock().
uint32_t mutex_trylock | ( | mutex_t * | m | ) |
Definition at line 52 of file sync.c.
References __dmb(), __ldrex(), __strex(), MUTEX_LOCKED, and MUTEX_UNLOCKED.
Referenced by mutex_lock().
void mutex_unlock | ( | mutex_t * | m | ) |
Definition at line 70 of file sync.c.
References __dmb(), and MUTEX_UNLOCKED.