Flipper Zero Firmware
Loading...
Searching...
No Matches
record.h File Reference

Furi: record API. More...

#include <stdbool.h>
#include "core_defines.h"

Go to the source code of this file.

Functions

void furi_record_init (void)
 Initialize record storage For internal use only.
 
bool furi_record_exists (const char *name)
 Check if record exists.
 
void furi_record_create (const char *name, void *data)
 Create record.
 
bool furi_record_destroy (const char *name)
 Destroy record.
 
FURI_RETURNS_NONNULL void * furi_record_open (const char *name)
 Open record.
 
void furi_record_close (const char *name)
 Close record.
 

Detailed Description

Furi: record API.

Function Documentation

◆ furi_record_close()

void furi_record_close ( const char * name)

Close record.

Parameters
namerecord name
Note
Thread safe. Open and close must be executed from the same thread.

◆ furi_record_create()

void furi_record_create ( const char * name,
void * data )

Create record.

Parameters
namerecord name
datadata pointer
Note
Thread safe. Create and destroy must be executed from the same thread.

◆ furi_record_destroy()

bool furi_record_destroy ( const char * name)

Destroy record.

Parameters
namerecord name
Returns
true if successful, false if still have holders or thread is not owner.
Note
Thread safe. Create and destroy must be executed from the same thread.

◆ furi_record_exists()

bool furi_record_exists ( const char * name)

Check if record exists.

Parameters
namerecord name
Note
Thread safe. Create and destroy must be executed from the same thread.

◆ furi_record_open()

FURI_RETURNS_NONNULL void * furi_record_open ( const char * name)

Open record.

Parameters
namerecord name
Returns
pointer to the record
Note
Thread safe. Open and close must be executed from the same thread. Suspends caller thread till record is available