RTEMS CPU Kit with SuperCore
4.11.3
|
Provides routines to ensure mutual exclusion on API level. More...
![]() |
Modules | |
RTEMS Allocator Mutex | |
Protection for all memory allocations and deallocations in RTEMS. | |
Files | |
file | apimutex.h |
API Mutex Handler API. | |
file | apimutex.c |
Initialization and Allocation for API Mutex Handler. | |
file | apimutexisowner.c |
file | apimutexlock.c |
Acquires the specified API mutex. | |
file | apimutexunlock.c |
Releases the Specified API Mutex. | |
Data Structures | |
struct | API_Mutex_Control |
Control block used to manage each API mutex. More... | |
Functions | |
void | _API_Mutex_Initialization (uint32_t maximum_mutexes) |
Initialization for the API Mutexe Handler. More... | |
void | _API_Mutex_Allocate (API_Mutex_Control **mutex) |
Allocates an API mutex from the inactive set and returns it in mutex. | |
void | _API_Mutex_Lock (API_Mutex_Control *mutex) |
Acquires the specified API mutex. More... | |
void | _API_Mutex_Unlock (API_Mutex_Control *mutex) |
Releases the specified API mutex. More... | |
bool | _API_Mutex_Is_owner (const API_Mutex_Control *mutex) |
Checks if the specified API mutex is owned by the executing thread. More... | |
Provides routines to ensure mutual exclusion on API level.
void _API_Mutex_Initialization | ( | uint32_t | maximum_mutexes | ) |
Initialization for the API Mutexe Handler.
The value maximum_mutexes is the maximum number of API mutexes that may exist at any time.
[in] | maximum_mutexes | is the maximum number of API mutexes. |
References _Objects_Initialize_information().
bool _API_Mutex_Is_owner | ( | const API_Mutex_Control * | mutex | ) |
Checks if the specified API mutex is owned by the executing thread.
[in] | mutex | The API mutex. |
References _Thread_Get_executing(), CORE_mutex_Control::holder, and API_Mutex_Control::Mutex.
void _API_Mutex_Lock | ( | API_Mutex_Control * | mutex | ) |
Acquires the specified API mutex.
[in] | mutex | The API mutex. |
void _API_Mutex_Unlock | ( | API_Mutex_Control * | mutex | ) |
Releases the specified API mutex.
[in] | mutex | The API mutex. |
References _CORE_mutex_Surrender(), _ISR_lock_ISR_disable, Objects_Control::id, API_Mutex_Control::Mutex, CORE_mutex_Control::nest_count, API_Mutex_Control::Object, and API_Mutex_Control::previous_thread_life_protection.