Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Thread interface definition for MQTT client. More...
Go to the source code of this file.
Typedefs | |
| typedef struct _IoT_Mutex_t | IoT_Mutex_t |
| The platform specific timer header that defines the Timer struct. | |
Functions | |
| IoT_Error_t | aws_iot_thread_mutex_init (IoT_Mutex_t *) |
| Initialize the provided mutex. | |
| IoT_Error_t | aws_iot_thread_mutex_lock (IoT_Mutex_t *) |
| Lock the provided mutex. | |
| IoT_Error_t | aws_iot_thread_mutex_trylock (IoT_Mutex_t *) |
| Lock the provided mutex. | |
| IoT_Error_t | aws_iot_thread_mutex_unlock (IoT_Mutex_t *) |
| Unlock the provided mutex. | |
| IoT_Error_t | aws_iot_thread_mutex_destroy (IoT_Mutex_t *) |
| Destroy the provided mutex. | |
Detailed Description
Thread interface definition for MQTT client.
Defines an interface that can be used by system components for multithreaded situations. Starting point for porting the SDK to the threading hardware layer of a new platform.
Definition in file threads_interface.h.
Typedef Documentation
| typedef struct _IoT_Mutex_t IoT_Mutex_t |
The platform specific timer header that defines the Timer struct.
Mutex Type
Forward declaration of a mutex struct. The definition of this struct is platform dependent. When porting to a new platform add this definition in "threads_platform.h".
Definition at line 49 of file threads_interface.h.
Function Documentation
| IoT_Error_t aws_iot_thread_mutex_destroy | ( | IoT_Mutex_t * | pMutex ) |
Destroy the provided mutex.
Call this function to destroy the mutex
- Parameters:
-
IoT_Mutex_t - pointer to the mutex to be destroyed
- Returns:
- IoT_Error_t - error code indicating result of operation
Definition at line 99 of file threads_pthread_wrapper.c.
| IoT_Error_t aws_iot_thread_mutex_init | ( | IoT_Mutex_t * | pMutex ) |
Initialize the provided mutex.
Call this function to initialize the mutex
- Parameters:
-
IoT_Mutex_t - pointer to the mutex to be initialized
- Returns:
- IoT_Error_t - error code indicating result of operation
Definition at line 31 of file threads_pthread_wrapper.c.
| IoT_Error_t aws_iot_thread_mutex_lock | ( | IoT_Mutex_t * | pMutex ) |
Lock the provided mutex.
Call this function to lock the mutex before performing a state change This is a blocking call.
- Parameters:
-
IoT_Mutex_t - pointer to the mutex to be locked
- Returns:
- IoT_Error_t - error code indicating result of operation
Call this function to lock the mutex before performing a state change Blocking, thread will block until lock request fails
- Parameters:
-
IoT_Mutex_t - pointer to the mutex to be locked
- Returns:
- IoT_Error_t - error code indicating result of operation
Definition at line 48 of file threads_pthread_wrapper.c.
| IoT_Error_t aws_iot_thread_mutex_trylock | ( | IoT_Mutex_t * | pMutex ) |
Lock the provided mutex.
Call this function to lock the mutex before performing a state change. This is not a blocking call.
- Parameters:
-
IoT_Mutex_t - pointer to the mutex to be locked
- Returns:
- IoT_Error_t - error code indicating result of operation
Lock the provided mutex.
Call this function to attempt to lock the mutex before performing a state change Non-Blocking, immediately returns with failure if lock attempt fails
- Parameters:
-
IoT_Mutex_t - pointer to the mutex to be locked
- Returns:
- IoT_Error_t - error code indicating result of operation
Definition at line 66 of file threads_pthread_wrapper.c.
| IoT_Error_t aws_iot_thread_mutex_unlock | ( | IoT_Mutex_t * | pMutex ) |
Unlock the provided mutex.
Call this function to unlock the mutex before performing a state change
- Parameters:
-
IoT_Mutex_t - pointer to the mutex to be unlocked
- Returns:
- IoT_Error_t - error code indicating result of operation
Definition at line 83 of file threads_pthread_wrapper.c.
Generated on Tue Jul 12 2022 19:02:38 by
1.7.2