AWS IoT Device SDK C:
Task Pool
Task pool library
|
Return to main page ↑ |
Internal header of task pool library. This header should not be included in typical application code. More...
#include "iot_config.h"
#include "iot_error.h"
#include "iot_taskpool.h"
#include "iot_logging_setup.h"
#include "iot_static_memory.h"
Go to the source code of this file.
Data Structures | |
struct | _taskPoolCache_t |
Task pool jobs cache. More... | |
struct | _taskPool_t |
The task pool data structure keeps track of the internal state and the signals for the dispatcher threads. The task pool is a thread safe data structure. More... | |
struct | _taskPoolJob_t |
The job data structure keeps track of the user callback and context, as well as the status of the job. More... | |
struct | _taskPoolTimerEvent_t |
Represents an operation that is subject to a timer. More... | |
Macros | |
#define | TASKPOOL_SUCCEEDED(x) ( ( x ) == IOT_TASKPOOL_SUCCESS ) |
Every public API return an enumeration value with an underlying value of 0 in case of success. | |
#define | TASKPOOL_FAILED(x) ( ( x ) != IOT_TASKPOOL_SUCCESS ) |
Every public API returns an enumeration value with an underlying value different than 0 in case of success. | |
#define | TASKPOOL_GOTO_CLEANUP() IOT_GOTO_CLEANUP() |
Jump to the cleanup area. | |
#define | TASKPOOL_FUNCTION_ENTRY(result) IOT_FUNCTION_ENTRY( IotTaskPoolError_t, result ) |
Declare the storage for the error status variable. | |
#define | TASKPOOL_ON_ERROR_GOTO_CLEANUP(expr) |
Check error and leave in case of failure. More... | |
#define | TASKPOOL_ON_NULL_ARG_GOTO_CLEANUP(ptr) IOT_VALIDATE_PARAMETER( IOT_TASKPOOL, ( ptr != NULL ) ) |
Exit if an argument is NULL. | |
#define | TASKPOOL_ON_ARG_ERROR_GOTO_CLEANUP(expr) IOT_VALIDATE_PARAMETER( IOT_TASKPOOL, ( ( expr ) == false ) ) |
Exit if an argument is NULL. | |
#define | TASKPOOL_SET_AND_GOTO_CLEANUP(expr) IOT_SET_AND_GOTO_CLEANUP( expr ) |
Set error and leave. | |
#define | TASKPOOL_FUNCTION_CLEANUP() IOT_FUNCTION_CLEANUP_BEGIN() |
Initialize error and declare start of cleanup area. | |
#define | TASKPOOL_FUNCTION_CLEANUP_END() IOT_FUNCTION_CLEANUP_END() |
Initialize error and declare end of cleanup area. | |
#define | TASKPOOL_NO_FUNCTION_CLEANUP() IOT_FUNCTION_EXIT_NO_CLEANUP() |
Create an empty cleanup area. | |
#define | TASKPOOL_NO_FUNCTION_CLEANUP_NOLABEL() return status |
Does not create a cleanup area. | |
#define | IotTaskPool_Assert(expression) |
Assertion macro for the Task pool library. More... | |
Functions | |
void * | IotTaskPool_MallocTaskPool (size_t size) |
Allocate an _taskPool_t. This function should have the same signature as [malloc]. | |
void | IotTaskPool_FreeTaskPool (void *ptr) |
Free an _taskPool_t. This function should have the same signature as [malloc]. | |
void * | IotTaskPool_MallocJob (size_t size) |
Allocate an IotTaskPoolJob_t. This function should have the same signature as [malloc]. | |
void | IotTaskPool_FreeJob (void *ptr) |
Free an IotTaskPoolJob_t. This function should have the same same signature as [malloc]. (http://pubs.opengroup.org/onlinepubs/9699919799/functions/malloc.html). | |
void * | IotTaskPool_MallocTimerEvent (size_t size) |
Allocate an _taskPoolTimerEvent_t. This function should have the same signature as [malloc]. | |
void | IotTaskPool_FreeTimerEvent (void *ptr) |
Free an _taskPoolTimerEvent_t. This function should have the same signature as[ free ]. | |
Internal header of task pool library. This header should not be included in typical application code.
#define TASKPOOL_ON_ERROR_GOTO_CLEANUP | ( | expr | ) |
Check error and leave in case of failure.
#define IotTaskPool_Assert | ( | expression | ) |
Assertion macro for the Task pool library.
Set IOT_TASKPOOL_ENABLE_ASSERTS to 1
to enable assertions in the Task pool library.
[in] | expression | Expression to be evaluated. |