Loading...
Searching...
No Matches
mutex.h File Reference

FuriMutex. More...

#include "base.h"
#include "thread.h"

Go to the source code of this file.

Enumerations

enum  FuriMutexType { FuriMutexTypeNormal , FuriMutexTypeRecursive }
 

Functions

FuriMutexfuri_mutex_alloc (FuriMutexType type)
 Allocate FuriMutex.
 
void furi_mutex_free (FuriMutex *instance)
 Free FuriMutex.
 
FuriStatus furi_mutex_acquire (FuriMutex *instance, uint32_t timeout)
 Acquire mutex.
 
FuriStatus furi_mutex_release (FuriMutex *instance)
 Release mutex.
 
FuriThreadId furi_mutex_get_owner (FuriMutex *instance)
 Get mutex owner thread id.
 

Detailed Description

FuriMutex.

Function Documentation

◆ furi_mutex_acquire()

FuriStatus furi_mutex_acquire ( FuriMutex * instance,
uint32_t timeout )

Acquire mutex.

Parameters
instanceThe pointer to FuriMutex instance
[in]timeoutThe timeout
Returns
The furi status.

◆ furi_mutex_alloc()

FuriMutex * furi_mutex_alloc ( FuriMutexType type)

Allocate FuriMutex.

Parameters
[in]typeThe mutex type
Returns
pointer to FuriMutex instance

◆ furi_mutex_free()

void furi_mutex_free ( FuriMutex * instance)

Free FuriMutex.

Parameters
instanceThe pointer to FuriMutex instance

◆ furi_mutex_get_owner()

FuriThreadId furi_mutex_get_owner ( FuriMutex * instance)

Get mutex owner thread id.

Parameters
instanceThe pointer to FuriMutex instance
Returns
The furi thread identifier.

◆ furi_mutex_release()

FuriStatus furi_mutex_release ( FuriMutex * instance)

Release mutex.

Parameters
instanceThe pointer to FuriMutex instance
Returns
The furi status.