this is fork and i will modify for STM32

Fork of AWS-test by Pierre-Marie Ancèle

Embed: (wiki syntax)

« Back to documentation index

threads_interface.h File Reference

threads_interface.h File Reference

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  )

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
IoT_Error_t aws_iot_thread_mutex_init ( IoT_Mutex_t  )

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
IoT_Error_t aws_iot_thread_mutex_lock ( IoT_Mutex_t  )

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
IoT_Error_t aws_iot_thread_mutex_trylock ( IoT_Mutex_t  )

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
IoT_Error_t aws_iot_thread_mutex_unlock ( IoT_Mutex_t  )

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