Flipper Zero Firmware
Loading...
Searching...
No Matches
semaphore.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 struct FuriSemaphore FuriSemaphore;
15
23FuriSemaphore* furi_semaphore_alloc(uint32_t max_count, uint32_t initial_count);
24
30
38FuriStatus furi_semaphore_acquire(FuriSemaphore* instance, uint32_t timeout);
39
46FuriStatus furi_semaphore_release(FuriSemaphore* instance);
47
54uint32_t furi_semaphore_get_count(FuriSemaphore* instance);
55
56#ifdef __cplusplus
57}
58#endif
void furi_semaphore_free(FuriSemaphore *instance)
Free semaphore.
Definition semaphore.c:39
FuriSemaphore * furi_semaphore_alloc(uint32_t max_count, uint32_t initial_count)
Allocate semaphore.
Definition semaphore.c:15
FuriStatus furi_semaphore_release(FuriSemaphore *instance)
Release semaphore.
Definition semaphore.c:82
FuriStatus furi_semaphore_acquire(FuriSemaphore *instance, uint32_t timeout)
Acquire semaphore.
Definition semaphore.c:47
uint32_t furi_semaphore_get_count(FuriSemaphore *instance)
Get semaphore count.
Definition semaphore.c:109
Definition semaphore.c:8
Furi: Furi Thread API.