Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
dpl_mutex.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2020 Inria
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
19
#include "os/os_mutex.h"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
28
struct
dpl_mutex
{
29
struct
os_mutex
mu
;
30
};
31
37
static
inline
dpl_error_t
dpl_mutex_init
(
struct
dpl_mutex
*mu)
38
{
39
return
(
dpl_error_t
) os_mutex_init(&mu->
mu
);
40
}
41
54
static
inline
dpl_error_t
dpl_mutex_pend
(
struct
dpl_mutex
*mu,
dpl_time_t
timeout)
55
{
56
return
(
dpl_error_t
) os_mutex_pend(&mu->
mu
, timeout);
57
}
58
67
static
inline
dpl_error_t
dpl_mutex_release
(
struct
dpl_mutex
*mu)
68
{
69
return
(
dpl_error_t
) os_mutex_release(&mu->
mu
);
70
}
71
72
#ifdef __cplusplus
73
}
74
#endif
dpl_error_t
os_error_t dpl_error_t
dpl error type
Definition
dpl_error.h:47
dpl_mutex_release
static dpl_error_t dpl_mutex_release(struct dpl_mutex *mu)
Release a mutex.
Definition
dpl_mutex.h:67
dpl_mutex_pend
static dpl_error_t dpl_mutex_pend(struct dpl_mutex *mu, dpl_time_t timeout)
Pend (wait) for a mutex.
Definition
dpl_mutex.h:54
dpl_mutex_init
static dpl_error_t dpl_mutex_init(struct dpl_mutex *mu)
Initializes a mutex object.
Definition
dpl_mutex.h:37
dpl_time_t
os_time_t dpl_time_t
dpl time type
Definition
dpl_types.h:53
dpl_mutex
dpl mutex wrapper
Definition
dpl_mutex.h:28
dpl_mutex::mu
struct os_mutex mu
the mutex
Definition
dpl_mutex.h:29
Generated on Sat Oct 3 2026 14:10:59 by
1.13.2