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
* Copyright (C) 2020 Inria
3
*
4
* This file is subject to the terms and conditions of the GNU Lesser
5
* General Public License v2.1. See the file LICENSE in the top level
6
* directory for more details.
7
*/
8
9
#pragma once
10
21
22
#include "os/os_mutex.h"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
31
struct
dpl_mutex
{
32
struct
os_mutex
mu
;
33
};
34
40
static
inline
dpl_error_t
dpl_mutex_init
(
struct
dpl_mutex
*mu)
41
{
42
return
(
dpl_error_t
) os_mutex_init(&mu->
mu
);
43
}
44
57
static
inline
dpl_error_t
dpl_mutex_pend
(
struct
dpl_mutex
*mu,
dpl_time_t
timeout)
58
{
59
return
(
dpl_error_t
) os_mutex_pend(&mu->
mu
, timeout);
60
}
61
70
static
inline
dpl_error_t
dpl_mutex_release
(
struct
dpl_mutex
*mu)
71
{
72
return
(
dpl_error_t
) os_mutex_release(&mu->
mu
);
73
}
74
75
#ifdef __cplusplus
76
}
77
#endif
dpl_error_t
os_error_t dpl_error_t
dpl error type
Definition
dpl_error.h:50
dpl_mutex_release
static dpl_error_t dpl_mutex_release(struct dpl_mutex *mu)
Release a mutex.
Definition
dpl_mutex.h:70
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:57
dpl_mutex_init
static dpl_error_t dpl_mutex_init(struct dpl_mutex *mu)
Initializes a mutex object.
Definition
dpl_mutex.h:40
dpl_time_t
os_time_t dpl_time_t
dpl time type
Definition
dpl_types.h:56
dpl_mutex
dpl mutex wrapper
Definition
dpl_mutex.h:31
dpl_mutex::mu
struct os_mutex mu
the mutex
Definition
dpl_mutex.h:32
Generated on Thu Oct 30 2025 19:21:17 by
1.13.2