Flipper Zero Firmware
Loading...
Searching...
No Matches
mutex.h
Go to the documentation of this file.
1
5#pragma once
6
7#include "base.h"
8#include "thread.h"
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14typedef enum {
15 FuriMutexTypeNormal,
16 FuriMutexTypeRecursive,
17} FuriMutexType;
18
19typedef struct FuriMutex FuriMutex;
20
27FuriMutex* furi_mutex_alloc(FuriMutexType type);
28
33void furi_mutex_free(FuriMutex* instance);
34
42FuriStatus furi_mutex_acquire(FuriMutex* instance, uint32_t timeout);
43
50FuriStatus furi_mutex_release(FuriMutex* instance);
51
59
60#ifdef __cplusplus
61}
62#endif
void furi_mutex_free(FuriMutex *instance)
Free FuriMutex.
Definition mutex.c:38
FuriStatus furi_mutex_acquire(FuriMutex *instance, uint32_t timeout)
Acquire mutex.
Definition mutex.c:46
FuriThreadId furi_mutex_get_owner(FuriMutex *instance)
Get mutex owner thread id.
Definition mutex.c:110
FuriMutex * furi_mutex_alloc(FuriMutexType type)
Allocate FuriMutex.
Definition mutex.c:18
FuriStatus furi_mutex_release(FuriMutex *instance)
Release mutex.
Definition mutex.c:82
Definition mutex.c:11
Furi: Furi Thread API.
void * FuriThreadId
Unique thread identifier type (used by the OS kernel).
Definition thread.h:55