]> begriffs open source - freertos/commit
In small FreeRTOS applications it is unlikely there will be any task pools other...
authorRichard Barry <ribarry@amazon.com>
Mon, 1 Jul 2019 17:05:20 +0000 (17:05 +0000)
committerRichard Barry <ribarry@amazon.com>
Mon, 1 Jul 2019 17:05:20 +0000 (17:05 +0000)
commite75b609c74ee99bbada77824ee607f4f55a32481
treeef12b03a7640edd24ec87fbb9769d52c7c09450e
parent76cc2a00c6812dc6c203209ed037c538c0cf01b2
In small FreeRTOS applications it is unlikely there will be any task pools other than the system task pool.  IotTaskPool_CreateRecyclableSystemJob() is therefore introduced to complement IotTaskPool_CreateRecyclableJob() that does not require the handle of the target task pool to be specified as a parameter.  Likewise IotTaskPool_ScheduleSystemJob() is introduced to complement IotTaskPool_ScheduleJob() for the same reason.
IotTaskPool_CreateSystemTaskPool() calls synchronisation primitives, so cannot be called before the scheduler starts.  Add a configASSERT() to ensure the scheduler is running when it executes.
IotTaskPool_CreateSystemTaskPool() can conceivably be called from multiple different libraries that depend on the thread pool.  In this version _IotSystemTaskPool.running can be used to check the system task pool has not already been created.  If the task pool has been created simply return from IotTaskPool_CreateSystemTaskPool() instead of re-creating it (which would leak memory and leave orphaned tasks).
Call taskENTER_CRITICAL() and taskEXIT_CRITICAL() directly in place of mapping them to TASKPOOL_ENTER_CRITICAL() and TASKPOOL_EXIT_CRITICAL() in the same file.
Rename _timerThread() _timerCallback(), as it is a callback function and not a thread.
Remove the unused flags parameter from _scheduleInternal().
FreeRTOS-Plus/Demo/FreeRTOS_Plus_IoT_SDK/TaskPool/.project
FreeRTOS-Plus/Demo/FreeRTOS_Plus_IoT_SDK/TaskPool/main.c
FreeRTOS-Plus/Source/FreeRTOS-Plus-IoT-SDK/c_sdk/standard/common/include/iot_taskpool.h
FreeRTOS-Plus/Source/FreeRTOS-Plus-IoT-SDK/c_sdk/standard/common/taskpool/iot_taskpool.c