uwb-core DPL (Decawave Porting Layer) mutex wrappers More...

Detailed Description

uwb-core DPL (Decawave Porting Layer) mutex wrappers

Author
Francisco Molina franc.nosp@m.ois-.nosp@m.xavie.nosp@m.r.mo.nosp@m.lina@.nosp@m.inri.nosp@m.a.fr

Definition in file dpl_mutex.h.

#include "dpl_types.h"
#include "dpl_error.h"
#include "mutex.h"
+ Include dependency graph for dpl_mutex.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  dpl_mutex
 dpl mutex wrapper More...
 

Functions

dpl_error_t dpl_mutex_init (struct dpl_mutex *mu)
 Initializes a mutex object. More...
 
dpl_error_t dpl_mutex_pend (struct dpl_mutex *mu, dpl_time_t timeout)
 Pend (wait) for a mutex. More...
 
dpl_error_t dpl_mutex_release (struct dpl_mutex *mu)
 Release a mutex. More...
 

Function Documentation

◆ dpl_mutex_init()

dpl_error_t dpl_mutex_init ( struct dpl_mutex mu)

Initializes a mutex object.

Parameters
[out]mupre-allocated mutex structure, must not be NULL.

◆ dpl_mutex_pend()

dpl_error_t dpl_mutex_pend ( struct dpl_mutex mu,
dpl_time_t  timeout 
)

Pend (wait) for a mutex.

Parameters
[in]muPointer to mutex.
[in]timeoutTimeout, in os ticks. A timeout of 0 means do not wait if not available. A timeout of OS_TIMEOUT_NEVER means wait forever.
Returns
dpl_error_t DPL_INVALID_PARM mutex passed in was NULL DPL_OK no error

◆ dpl_mutex_release()

dpl_error_t dpl_mutex_release ( struct dpl_mutex mu)

Release a mutex.

Returns
dpl_error_t DPL_INVALID_PARM mutex was NULL DPL_OK no error