Files | |
| file | MutexP.h |
| Mailbox module for the RTOS Porting Interface. | |
Data Structures | |
| struct | MutexP_Object |
| MutexP Mutex Object. More... | |
Variables | |
| void * | MutexP_Object::object |
| uintptr_t | MutexP_Object::key |
MutexP Status codes | |
| typedef int32_t | MutexP_Status |
| This enumerator defines the Status codes for MutexP APIs. More... | |
| typedef void * | MutexP_Handle |
| Opaque client reference to an instance of a MutexP. More... | |
| MutexP_Handle | MutexP_create (MutexP_Object *mutexObj) |
| Function to create a mutex. More... | |
| MutexP_Status | MutexP_delete (MutexP_Handle handle) |
| Function to delete a mutex. More... | |
| MutexP_Status | MutexP_unlock (MutexP_Handle handle) |
| Function to unlock the mutex. More... | |
| MutexP_Status | MutexP_lock (MutexP_Handle handle, uint32_t timeout) |
| Function to lock the mutex. More... | |
| #define | MutexP_OK 0 |
| #define | MutexP_FAILURE (-(int32_t)1) |
| #define | MutexP_TIMEOUT (-(int32_t)2) |
| #define | MutexP_WAIT_FOREVER (~((uint32_t)0U)) |
| Wait forever define. More... | |
| #define | MutexP_NO_WAIT ((uint32_t)0U) |
| No wait define. More... | |
MutexP interface
| #define MutexP_OK 0 |
API completed successfully
| #define MutexP_FAILURE (-(int32_t)1) |
API failed
| #define MutexP_TIMEOUT (-(int32_t)2) |
API failed because of a timeout
| #define MutexP_WAIT_FOREVER (~((uint32_t)0U)) |
Wait forever define.
| #define MutexP_NO_WAIT ((uint32_t)0U) |
No wait define.
| typedef int32_t MutexP_Status |
This enumerator defines the Status codes for MutexP APIs.
| typedef void* MutexP_Handle |
Opaque client reference to an instance of a MutexP.
A MutexP_Handle returned from the MutexP_create represents that instance and is used in the other instance based functions
| MutexP_Handle MutexP_create | ( | MutexP_Object * | mutexObj | ) |
Function to create a mutex.
| mutexObj | Pointer to the mutex object |
| MutexP_Status MutexP_delete | ( | MutexP_Handle | handle | ) |
Function to delete a mutex.
| handle | A MutexP_Handle returned from MutexP_create |
| MutexP_Status MutexP_unlock | ( | MutexP_Handle | handle | ) |
Function to unlock the mutex.
| handle | A MutexP_Handle returned from MutexP_create |
| MutexP_Status MutexP_lock | ( | MutexP_Handle | handle, |
| uint32_t | timeout | ||
| ) |
Function to lock the mutex.
| handle | A MutexP_Handle returned from MutexP_create |
| timeout | Timeout (in milliseconds) to wait for lock the mutex. |
| void* MutexP_Object::object |
Pointer to OS specifc mutex object
| uintptr_t MutexP_Object::key |
The key returned during mutex lock