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:41
FuriStatus furi_mutex_acquire(FuriMutex *instance, uint32_t timeout)
Acquire mutex.
Definition mutex.c:53
FuriThreadId furi_mutex_get_owner(FuriMutex *instance)
Get mutex owner thread id.
Definition mutex.c:125
FuriMutex * furi_mutex_alloc(FuriMutexType type)
Allocate FuriMutex.
Definition mutex.c:21
FuriStatus furi_mutex_release(FuriMutex *instance)
Release mutex.
Definition mutex.c:93
Definition mutex.c:13
Furi: Furi Thread API.
void * FuriThreadId
Unique thread identifier type (used by the OS kernel).
Definition thread.h:56