Skip to content

Conversation

@tony-josi-aws
Copy link
Member

Description

FreeRTOS APIs shouldn't be called while the scheduler is suspended - vTaskSuspendAll

Depending on the user implementation of FreeRTOS_printf its highly likely that there will be blocking FreeRTOS API calls done from FreeRTOS_printf.

This PR removes the usage of FreeRTOS_printf from the suspended scheduler region in prvAcceptWaitClient.

Thanks TDB for reporting this issue in FreeRTOS forum: https://forums.freertos.org/t/prvacceptwaitclient-gets-interrupted-with-xsemaphoretake-while-tasks-are-suspended/23056

Test Steps

Tested with a sample echo server on STM32F4

Checklist:

  • I have tested my changes. No regression in existing tests.
  • [ ] I have modified and/or added unit-tests to cover the code changes in this Pull Request.

Related Issue

https://forums.freertos.org/t/prvacceptwaitclient-gets-interrupted-with-xsemaphoretake-while-tasks-are-suspended/23056

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@tony-josi-aws tony-josi-aws requested a review from a team as a code owner May 13, 2025 05:46
@tony-josi-aws tony-josi-aws merged commit a225fe9 into FreeRTOS:main May 13, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants