|
IoT managed integrations End Device SDK
|
This file defines thread functions platform abstraction interface. More...
#include <stdint.h>Go to the source code of this file.
Typedefs | |
| typedef struct iotmiPal_ThreadStruct | iotmiPal_ThreadStruct_t |
| typedef struct iotmiPal_ThreadStruct * | iotmiPal_ThreadHandle_t |
| typedef void(* | iotmiPal_ThreadFunction_t) (void *pParam) |
| Thread function to be executed in the created thread. | |
| typedef enum iotmiPal_ThreadType | iotmiPal_ThreadType_t |
| Thread type to be created. | |
Enumerations | |
| enum | iotmiPal_ThreadType { IOTMI_PAL_THREAD_URGENT = 0 , IOTMI_PAL_THREAD_NORMAL , IOTMI_PAL_THREAD_BACKGROUND , IOTMI_PAL_THREAD_MQTT_AGENT , IOTMI_PAL_THREAD_DATA_MODEL_HANDLER , IOTMI_PAL_THREAD_JOB_HANDLER , IOTMI_PAL_THREAD_MISC } |
| Thread type to be created. | |
Functions | |
| iotmiPal_ThreadHandle_t | iotmiPal_threadCreate (const char *pThreadname, iotmiPal_ThreadType_t threadType, iotmiPal_ThreadFunction_t threadFunc, void *pParam) |
| Create thread function. | |
| int | iotmiPal_threadJoin (iotmiPal_ThreadHandle_t threadHandle) |
| Thread join function. | |
| void | iotmiPal_threadSleepMs (uint32_t sleepTimeMs) |
| Millisecond sleep function. | |
This file defines thread functions platform abstraction interface.
| typedef void(* iotmiPal_ThreadFunction_t) (void *pParam) |
Thread function to be executed in the created thread.
| [in] | pParam | The pParam parameter passed in iotmiPal_threadCreate function. |
| iotmiPal_ThreadHandle_t iotmiPal_threadCreate | ( | const char * | pThreadname, |
| iotmiPal_ThreadType_t | threadType, | ||
| iotmiPal_ThreadFunction_t | threadFunc, | ||
| void * | pParam | ||
| ) |
Create thread function.
| [in] | pThreadname | The thread name of the created thread function. |
| [in] | threadType | The thread type of the created thread. Stack priority and stack size can be set accordingly. |
| [in] | threadFunc | The thread function to run for the created thread. |
| [in] | pParam | The pParam parameter passed in iotmiPal_ThreadFunction_t function. |
| int iotmiPal_threadJoin | ( | iotmiPal_ThreadHandle_t | threadHandle | ) |
Thread join function.
| [in] | threadHandle | The thread handle of the thread to be waited. |
| void iotmiPal_threadSleepMs | ( | uint32_t | sleepTimeMs | ) |
Millisecond sleep function.
| [in] | sleepTimeMs | milliseconds to sleep. |