Closed schilkp closed 3 months ago
Fixed spelling error. CMock tests continue to fail due to missing fallback macro in FreeRTOS.h in "FreeRTOS" repo as described above.
Hi @schilkp , Thanks for creating the PR. Please fix the spell check errors. After that we can merge the PR.
Hi @shubnil!
Thanks for the review. Sure - It seems I still can't get that word correct after 2 tries :)
In general, what is the preferred workflow here? Do you want to me to force-push a fixed version (including possibly a re-base) or stack a commit?
You can abandon this PR and create a new one with the fix.
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code
Description
Discussed here: https://forums.freertos.org/t/tracing-improvements/20097
This hook enables tracers to run code on startup after all RTOS resources are created and to detect that the scheduler is starting without relying on traceENTER/traceEXIT macros.
It also provides tracers access to the task handle of all IDLE tasks, allowing them to be identified unambiguously and without relying on INCLUDE_xTaskGetIdleTaskHandle.
Notes: I had another think about the above discussion regarding a
traceTASK_IS_IDLE_TASK
andtraceTASK_IS_TIMER_TASK
hook. I agree that they are probably very specific and maybe not the best solution. Instead I propose atraceSTARTING_SCHEDULER
hook that is called just beforexPortStartScheduler
and exposes the idle task TCBs.This is probably a much more generic solution. It allows tracers to cleanly detect that the scheduler has started, and gives them an opportunity to inject code after the idle and timer tasks have been created. This allows a tracer to, if they wish, identify those tasks unambiguously.
I opted to expose
xIdleTaskHandles
as a macro parameter so the tracer does not have rely on "unhygienically" accessing this static variable or onINCLUDE_xTaskGetIdleTaskHandle
being enabled.I am happy for feedback here if you think this is appropriate.
Test Steps
The CMOCK test suite in https://github.com/FreeRTOS/FreeRTOS continues to pass with no regressions, after the fallback tracing hook has also been added to the duplicate FreeRTOS.h header file in that repo used during mock code generation:
Please let me know how, if you are looking at merging, how I should go about updating this?
Checklist:
Related Issue
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.