TF-M Reference Manual  1.2.0
TrustedFirmware-M
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mutex.h File Reference
#include "common.h"
Include dependency graph for mutex.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void * os_wrapper_mutex_create (void)
 Creates a mutex for mutual exclusion of resources. More...
 
uint32_t os_wrapper_mutex_acquire (void *handle, uint32_t timeout)
 Acquires a mutex that is created by os_wrapper_mutex_create() More...
 
uint32_t os_wrapper_mutex_release (void *handle)
 Releases the mutex acquired previously. More...
 
uint32_t os_wrapper_mutex_delete (void *handle)
 Deletes a mutex that is created by os_wrapper_mutex_create() More...
 

Function Documentation

uint32_t os_wrapper_mutex_acquire ( void *  handle,
uint32_t  timeout 
)

Acquires a mutex that is created by os_wrapper_mutex_create()

Parameters
[in]handleThe handle of the mutex to acquire. Should be one of the handles returned by os_wrapper_mutex_create()
[in]timeoutThe maximum amount of time(in tick periods) for the thread to wait for the mutex to be available. If timeout is zero, the function will return immediately. Setting timeout to OS_WRAPPER_WAIT_FOREVER will cause the thread to wait indefinitely
Returns
OS_WRAPPER_SUCCESS on success or OS_WRAPPER_ERROR on error

Definition at line 98 of file os_wrapper_cmsis_rtos_v2.c.

Here is the caller graph for this function:

void* os_wrapper_mutex_create ( void  )

Creates a mutex for mutual exclusion of resources.

Returns
The handle of the created mutex on success or NULL on error

Definition at line 81 of file os_wrapper_cmsis_rtos_v2.c.

Here is the caller graph for this function:

uint32_t os_wrapper_mutex_delete ( void *  handle)

Deletes a mutex that is created by os_wrapper_mutex_create()

Parameters
[in]handleThe handle of the mutex to be deleted
Returns
OS_WRAPPER_SUCCESS on success or OS_WRAPPER_ERROR on error

Definition at line 132 of file os_wrapper_cmsis_rtos_v2.c.

uint32_t os_wrapper_mutex_release ( void *  handle)

Releases the mutex acquired previously.

Parameters
[in]handleThe handle of the mutex that has been acquired
Returns
OS_WRAPPER_SUCCESS on success or OS_WRAPPER_ERROR on error

Definition at line 116 of file os_wrapper_cmsis_rtos_v2.c.

Here is the caller graph for this function: