30#define API_LOCK_EVENT (1U << 0)
32#define api_lock_alloc_locked() furi_event_flag_alloc()
34#define api_lock_wait_unlock(_lock) \
35 furi_event_flag_wait(_lock, API_LOCK_EVENT, FuriFlagWaitAny, FuriWaitForever)
37#define api_lock_free(_lock) furi_event_flag_free(_lock)
39#define api_lock_unlock(_lock) furi_event_flag_set(_lock, API_LOCK_EVENT)
41#define api_lock_wait_unlock_and_free(_lock) \
42 api_lock_wait_unlock(_lock); \
45#define api_lock_is_locked(_lock) (!(furi_event_flag_get(_lock) & API_LOCK_EVENT))
47#define api_lock_relock(_lock) furi_event_flag_clear(_lock, API_LOCK_EVENT)
Definition event_flag.c:14