-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(freertos): Correct taskRESERVED_TASK_NAME_LENGTH macro definition #1241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(freertos): Correct taskRESERVED_TASK_NAME_LENGTH macro definition #1241
Conversation
Hi, @kstribrnAmzn @aggarg! A minor correction is needed to the change introduced in #1227. PTAL Thanks! |
Test updates for failed CI run here - FreeRTOS/FreeRTOS#1324. |
If we do this, we need to update the task name writing code as well because we only write one character for the core number as of now - https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/tasks.c#L3601. With the current code, the idle task name would contain wrong core number if the number of cores happen to be more than 9. Since task name is just debugging aid, I think it okay as opposed to adding more task name formatting code. What do you think? |
Sure, I agree that avoiding more complex task name formatting for multi-digit core numbers is acceptable. The downside is that the idle task name will contain a "random" ASCII character if the core id exceeds 9. It might be worth considering an update in the future to handle this case if needed. In the meantime, do you think we should add a comment to clarify this limitation and prevent potential confusion? |
Yes, sure. Would you please do that in this PR ;) |
ec4b02b
to
71390c6
Compare
Added a note. PTAL again Thanks! |
This commit updates the definition of taskRESERVED_TASK_NAME_LENGTH in tasks.c to fix an unreachable preprocessor condition. Signed-off-by: Sudeep Mohanty <[email protected]>
71390c6
to
5762092
Compare
|
Thanks for fixing this :) I noticed this soon after when doing some safety certification work and we chose to fix it in the same way - but I hadn't had the chance to upstream this work since I was out. |
Description
The
taskRESERVED_TASK_NAME_LENGTH
definition introduced in #1227 is incorrect for the conditionconfigNUMBER_OF_CORES > 9
as it will never be reached due to the overlapping preprocessor condition ofconfigNUMBER_OF_CORES > 1
before it.This PR updates the removes the preprocessor condition for
configNUMBER_OF_CORES > 9
and adds a note during idle task naming about it.Test Steps
configNUMBER_OF_CORES > 9
and build any port for the FreeRTOS kernel.Checklist:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.