Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
threads_arch.c File Reference
#include "modules/core/threads.h"
#include "modules/core/threads_arch.h"
#include "stdbool.h"
#include "mcu_periph/sys_time.h"
+ Include dependency graph for threads_arch.c:

Go to the source code of this file.

Functions

int pprz_mtx_init (pprz_mutex_t *mtx)
 
int pprz_mtx_lock (pprz_mutex_t *mtx)
 
int pprz_mtx_trylock (pprz_mutex_t *mtx)
 Performs a nonblocking lock on the mutex.
 
int pprz_mtx_unlock (pprz_mutex_t *mtx)
 
void pprz_bsem_init (pprz_bsem_t *bsem, bool taken)
 
void pprz_bsem_wait (pprz_bsem_t *bsem)
 
int pprz_bsem_wait_timeout (pprz_bsem_t *bsem, float timeout)
 Wait on semaphore no more than timeout.
 
void pprz_bsem_signal (pprz_bsem_t *bsem)
 

Function Documentation

◆ pprz_bsem_init()

void pprz_bsem_init ( pprz_bsem_t bsem,
bool  taken 
)

Definition at line 39 of file threads_arch.c.

References bsem, foo, and pprzBSem::value.

◆ pprz_bsem_signal()

void pprz_bsem_signal ( pprz_bsem_t bsem)

Definition at line 64 of file threads_arch.c.

References bsem, and pprzBSem::value.

◆ pprz_bsem_wait()

void pprz_bsem_wait ( pprz_bsem_t bsem)

Definition at line 43 of file threads_arch.c.

References bsem, and pprzBSem::value.

◆ pprz_bsem_wait_timeout()

int pprz_bsem_wait_timeout ( pprz_bsem_t bsem,
float  timeout 
)

Wait on semaphore no more than timeout.

Parameters
timeoutin seconds
Returns
0 on success

Definition at line 52 of file threads_arch.c.

References bsem, foo, get_sys_time_float(), timeout, and pprzBSem::value.

+ Here is the call graph for this function:

◆ pprz_mtx_init()

int pprz_mtx_init ( pprz_mutex_t mtx)

Definition at line 18 of file threads_arch.c.

References foo, and mtx.

◆ pprz_mtx_lock()

int pprz_mtx_lock ( pprz_mutex_t mtx)

Definition at line 23 of file threads_arch.c.

References foo, and mtx.

◆ pprz_mtx_trylock()

int pprz_mtx_trylock ( pprz_mutex_t mtx)

Performs a nonblocking lock on the mutex.

Returns
0 if successful

Definition at line 28 of file threads_arch.c.

References foo, and mtx.

◆ pprz_mtx_unlock()

int pprz_mtx_unlock ( pprz_mutex_t mtx)

Definition at line 34 of file threads_arch.c.

References foo, and mtx.