Commit graph

9 commits

Author SHA1 Message Date
Ivan Grokhotkov 6f90393f22 docs: link to FreeRTOS APIs from SMP changes documentation 2017-12-27 16:54:14 +08:00
Darian Leung df6adbd5bf freertos/fix SMP bug with Idle task clean up
This commit backports vTaskDelete() behavior from FreeRTOS v9.0.0  which
allows for the immediate freeing of task memory if the task being deleted
is not currently running and not pinned to the other core. This commit also
fixes a bug in prvCheckTasksWaitingTermination which prevented the
Idle Task from cleaning up all tasks awaiting deletion. Each iteration of the Idle
Task should traverse the xTasksWaitingTermination list and clean up all tasks
not pinned to the other core. The previous implementation would cause
prvCheckTasksWaitingTermination to return when encountering a task
pinned to the other core whilst traversing the xTasksWaitingTermination list.

The test case for vTaskDelete() has been updated to test for the bugfix and
backported deletion behavior.
2017-12-27 16:54:14 +08:00
Darian Leung c1d101dd41 freertos/backport and test v9.0.0 functions
This commit backports the following features from FreeRTOS v9.0.0
- uxSemaphoreGetCount()
- vTimerSetTimerId(), xTimerGetPeriod(), xTimerGetExpiryTime()
- xTimerCreateStatic()
- xEventGroupCreateStatic()
- uxSemaphoreGetCount()

Functions backported previously
- xTaskCreateStatic()
- xQueueCreateStatic()
- xSemaphoreCreateBinaryStatic(), xSemaphoreCreateCountingStatic()
- xSemaphoreCreateMutexStatic(), xSemaphoreCreateRecursiveMutexStatic()
- pcQueueGetName()
- vTaskSetThreadLocalStoragePointer()
- pvTaskGetThreadLocalStoragePointer()

Unit tests were also written for the functions above (except for pcQueueGetName
which is tested in a separate Queue Registry MR). The original tlsp and del cb test case
was deleted and integrated into the test cases of this MR.
2017-11-23 14:18:09 +08:00
Ivan Grokhotkov 8e01b4aef8 Merge branch 'docs/esp32_hooks' into 'master'
docs/Added documentation about esp32 hooks

See merge request !1417
2017-10-19 12:32:36 +08:00
Darian Leung 461f8da704 docs/Added documentation about esp32 hooks
This commit adds documentation about the esp32 Idle and Tick Hooks
2017-10-18 15:19:35 +08:00
Angus Gratton 86c89ff169 pthread: Add support for pthread thread local storage
Refactors LWIP to use this for the LWIP thread local semaphore
2017-10-17 14:46:08 +08:00
Angus Gratton 3e62c2e052 freertos: When scheduler is disabled, tasks on other core should immediately resume
... if triggered by a SemaphoreGive/etc.

Previously they would resume after scheduler was resumed, on next
RTOS tick of other CPU.
2017-10-11 10:48:20 +11:00
Angus Gratton f2f9170abc freertos: Fix bug with xTaskResumeAll() not resuming all tasks
Previously if multiple tasks had been added to xPendingReadyList for the CPU, only the first one was resumed.

Includes a test case for resuming multiple (pending) tasks on xTaskResumeAll().

Document the limitation that while scheduler is suspended on one CPU, it can't wake tasks on either CPU.
2017-10-11 10:48:20 +11:00
Darian Leung 6ab552a6ea docs: Added documentation for FreeRTOS SMP changes
Added documentation about the ESP-IDF changes to FreeRTOS.
The documentation covers changes to the following FreeRTOS aspects.

    - Task Creation
    - Affects on scheduling (Task skipping, scheduler suspension, tick synchronicity)
    - Critical sections and disabling interrupts
    - Thread Local Storage Pointers and deletion callbacks
    - Configuring ESP-IDF FreeRTOS
2017-09-21 16:40:57 +08:00