Skip to content
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

the printf in printf-stdarg.h is not thread safe #90

Open
umairsiddiqui-digitek opened this issue Jul 26, 2018 · 2 comments
Open

the printf in printf-stdarg.h is not thread safe #90

umairsiddiqui-digitek opened this issue Jul 26, 2018 · 2 comments
Assignees
Labels

Comments

@umairsiddiqui-digitek
Copy link
Contributor

umairsiddiqui-digitek commented Jul 26, 2018

it would be nice if you use a thread safe version of printf .
one such threadsafe printf:
thread safe version of printf found on freertos forum

@henrique-silva
Copy link
Contributor

Yes, these [v][s][n]printf could cause some stack corruptions as a lot of people reported on the forums.
I didn't change it before because the print itself was only used during debug routines, but it should definitely be thread-safe.

I'll try to replace the current code for the FreeRTOS implementation and check if it works correctly

Thanks!

@henrique-silva henrique-silva self-assigned this Jul 27, 2018
@umairsiddiqui-digitek
Copy link
Contributor Author

what about adding FreeRTOS_Plus_IO, it can used for both I2C and UART.

https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_IO/FreeRTOS_Plus_IO.shtml

https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_IO/Character_Queue_Transfer_Mode.shtml

printf can call write() function of FreeRTOS_Plus_IO.

@augustofg augustofg self-assigned this Jan 15, 2021
@augustofg augustofg mentioned this issue Apr 30, 2021
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants