Flipper Zero Firmware
Loading...
Searching...
No Matches
example_event_loop_mutex.c File Reference

Example application that demonstrates the FuriEventLoop and FuriMutex integration. More...

#include <furi.h>
#include <furi_hal_random.h>

Data Structures

struct  EventLoopMutexApp
 

Macros

#define TAG   "ExampleEventLoopMutex"
 
#define WORKER_ITERATION_COUNT   (10)
 
#define MUTEX_EVENT_AND_FLAGS    (FuriEventLoopEventIn | FuriEventLoopEventFlagEdge | FuriEventLoopEventFlagOnce)
 

Functions

int32_t example_event_loop_mutex_app (void *arg)
 

Detailed Description

Example application that demonstrates the FuriEventLoop and FuriMutex integration.

This application simulates a use case where a time-consuming blocking operation is executed in a separate thread and a mutex is being used for synchronization. The application runs 10 iterations of the above mentioned simulated work and prints the results to the debug output each time, then exits.