CardSight
0.1.0
C API reference for the CardSight firmware and application
Loading...
Searching...
No Matches
mutex.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: GPL-2.0-or-later */
9
10
#ifndef CARDSIGHT_MUTEX_H
11
#define CARDSIGHT_MUTEX_H
12
14
#define WAIT_FOREVER (-1)
16
#define NO_WAIT 0
17
21
struct
mutex
{
22
void
*
handle
;
23
};
24
30
void
mutex_init
(
struct
mutex
*lock);
39
int
mutex_lock_timeout
(
struct
mutex
*lock,
int
timeout_ms);
45
void
mutex_unlock
(
struct
mutex
*lock);
46
47
#endif
/* CARDSIGHT_MUTEX_H */
mutex_unlock
void mutex_unlock(struct mutex *lock)
Release a mutex.
mutex_init
void mutex_init(struct mutex *lock)
Initialize a mutex.
mutex_lock_timeout
int mutex_lock_timeout(struct mutex *lock, int timeout_ms)
Take a mutex, waiting at most a bounded time.
mutex
A sleeping mutual-exclusion lock.
Definition
mutex.h:21
mutex::handle
void * handle
Definition
mutex.h:22
software
include
hal
mutex.h
Generated by
1.15.0