Task Pool API Reference
Task pool library
|
Go to the documentation of this file.
28 #ifndef IOT_TASKPOOL_TYPES_H_
29 #define IOT_TASKPOOL_TYPES_H_
32 #include "iot_config.h"
50 typedef enum IotTaskPoolError
156 typedef enum IotTaskPoolJobStatus
223 typedef struct IotTaskPoolJobStorage
261 void * pUserContext );
273 typedef struct IotTaskPoolInfo
325 #define IOT_TASKPOOL_INFO_INITIALIZER_SMALL { .minThreads = 1, .maxThreads = 1, .stackSize = IOT_THREAD_DEFAULT_STACK_SIZE, .priority = IOT_THREAD_DEFAULT_PRIORITY }
327 #define IOT_TASKPOOL_INFO_INITIALIZER_MEDIUM { .minThreads = 1, .maxThreads = 2, .stackSize = IOT_THREAD_DEFAULT_STACK_SIZE, .priority = IOT_THREAD_DEFAULT_PRIORITY }
329 #define IOT_TASKPOOL_INFO_INITIALIZER_LARGE { .minThreads = 2, .maxThreads = 3, .stackSize = IOT_THREAD_DEFAULT_STACK_SIZE, .priority = IOT_THREAD_DEFAULT_PRIORITY }
331 #define IOT_TASKPOOL_INFO_INITIALIZER_XLARGE { .minThreads = 2, .maxThreads = 4, .stackSize = IOT_THREAD_DEFAULT_STACK_SIZE, .priority = IOT_THREAD_DEFAULT_PRIORITY }
333 #define IOT_TASKPOOL_INFO_INITIALIZER IOT_TASKPOOL_INFO_INITIALIZER_MEDIUM
335 #define IOT_TASKPOOL_INITIALIZER NULL
337 #define IOT_TASKPOOL_JOB_STORAGE_INITIALIZER { { NULL, NULL }, NULL, NULL, 0, IOT_TASKPOOL_STATUS_UNDEFINED }
339 #define IOT_TASKPOOL_JOB_INITIALIZER NULL
349 #define IOT_TASKPOOL_JOB_HIGH_PRIORITY ( ( uint32_t ) 0x00000001 )
357 #define IOT_SYSTEM_TASKPOOL ( NULL )
Task pool operation failed because of an invalid parameter.
Definition: iot_taskpool_types.h:135
void(* IotTaskPoolRoutine_t)(IotTaskPool_t pTaskPool, IotTaskPoolJob_t pJob, void *pUserContext)
Callback type for a user callback.
Definition: iot_taskpool_types.h:259
int32_t priority
priority for every task pool thread. The priority for each thread is fixed after the task pool is cre...
Definition: iot_taskpool_types.h:287
Job has been canceled before executing.
Definition: iot_taskpool_types.h:186
Task pool operation failed because at least one parameter is invalid.
Definition: iot_taskpool_types.h:90
IotLink_t link
Placeholder.
Definition: iot_taskpool_types.h:225
uint32_t dummy4
Placeholder.
Definition: iot_taskpool_types.h:228
struct _taskPool * IotTaskPool_t
Opaque handle of a Task Pool instance.
Definition: iot_taskpool_types.h:213
void * dummy3
Placeholder.
Definition: iot_taskpool_types.h:227
IotTaskPoolJobStatus_t
Status codes of task pool Job.
Definition: iot_taskpool_types.h:156
Task pool operation failed because it is illegal.
Definition: iot_taskpool_types.h:105
Job has been queued for execution.
Definition: iot_taskpool_types.h:168
Initialization information to create one task pool instance.
Definition: iot_taskpool_types.h:273
Job is executing.
Definition: iot_taskpool_types.h:180
Task pool operation completed successfully.
Definition: iot_taskpool_types.h:70
Task pool operation failed because allocating memory failed.
Definition: iot_taskpool_types.h:119
Task pool cancellation failed.
Definition: iot_taskpool_types.h:144
uint32_t minThreads
Specifies the operating parameters for a task pool.
Definition: iot_taskpool_types.h:284
Job is ready to be scheduled.
Definition: iot_taskpool_types.h:162
The job storage data structure provides the storage for a statically allocated Task Pool Job instance...
Definition: iot_taskpool_types.h:223
Job has been scheduled for deferred execution.
Definition: iot_taskpool_types.h:174
uint32_t stackSize
Stack size for every task pool thread. The stack size for each thread is fixed after the task pool is...
Definition: iot_taskpool_types.h:286
uint32_t maxThreads
Maximum number of threads in a task pool. A task pool may try and grow the number of active threads u...
Definition: iot_taskpool_types.h:285
IotTaskPoolError_t
Return codes of task pool functions.
Definition: iot_taskpool_types.h:50
IotTaskPoolJobStatus_t status
Placeholder.
Definition: iot_taskpool_types.h:229
void * dummy2
Placeholder.
Definition: iot_taskpool_types.h:226
struct _taskPoolJob * IotTaskPoolJob_t
Opaque handle of a Task Pool Job.
Definition: iot_taskpool_types.h:246
Job status is undefined.
Definition: iot_taskpool_types.h:192