]> git.sur5r.net Git - freertos/commit
In small FreeRTOS applications it is unlikely there will be any task pools other...
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 1 Jul 2019 17:05:20 +0000 (17:05 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Mon, 1 Jul 2019 17:05:20 +0000 (17:05 +0000)
commitb63bf362086b59b6dc07c9d38c80a4a3ffd5ef31
treeef12b03a7640edd24ec87fbb9769d52c7c09450e
parenta7b8bcb91cf7bdcb79fe1724320e1b3719cff03c
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().

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2668 1d2547de-c912-0410-9cb9-b8ca96c0e9e2
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