AWS IoT Device SDK C: Task Pool
Task pool library
Return to main page ↑
Constants

Defined constants of the task pool library.

Libraries may #define constants in their headers with special meanings. This page describes the meanings and uses of any constants defined by the task pool library. Related constants are shown in a single section on this page.

Task pool Initializers

Provides default values for initializing the data types of the task pool library.

#define IOT_TASKPOOL_INFO_INITIALIZER_SMALL { .minThreads = 1, .maxThreads = 1, .stackSize = IOT_THREAD_DEFAULT_STACK_SIZE, .priority = IOT_THREAD_DEFAULT_PRIORITY }
#define IOT_TASKPOOL_INFO_INITIALIZER_MEDIUM { .minThreads = 1, .maxThreads = 2, .stackSize = IOT_THREAD_DEFAULT_STACK_SIZE, .priority = IOT_THREAD_DEFAULT_PRIORITY }
#define IOT_TASKPOOL_INFO_INITIALIZER_LARGE { .minThreads = 2, .maxThreads = 3, .stackSize = IOT_THREAD_DEFAULT_STACK_SIZE, .priority = IOT_THREAD_DEFAULT_PRIORITY }
#define IOT_TASKPOOL_INFO_INITIALIZER_XLARGE { .minThreads = 2, .maxThreads = 4, .stackSize = IOT_THREAD_DEFAULT_STACK_SIZE, .priority = IOT_THREAD_DEFAULT_PRIORITY }
#define IOT_TASKPOOL_INFO_INITIALIZER IOT_TASKPOOL_INFO_INITIALIZER_MEDIUM
#define IOT_TASKPOOL_INITIALIZER NULL
#define IOT_TASKPOOL_JOB_STORAGE_INITIALIZER { { NULL, NULL }, NULL, NULL, 0, IOT_TASKPOOL_STATUS_UNDEFINED }
#define IOT_TASKPOOL_JOB_INITIALIZER NULL

All user-facing data types of the task pool library can be initialized using one of the following.

Warning
Failure to initialize a task pool data type with the appropriate initializer may result in a runtime error!
Note
The initializers may change at any time in future versions, but their names will remain the same.

Example

IotTaskPool_t * pTaskPool;
IotTaskPoolError_t error = IotTaskPool_Create( &tpInfo, &pTaskPool );
// Use the task pool
// ...