I don't have a problem but I am just trying to understand why something works. I am running FreeRTOS on the Pico with SMP enabled. I have stdio enabled over usb.
I am able to call printf functions without acquiring any mutex locks. I created 4 tasks and called printf from all of them. They seem to work without freezing up.
I am trying to understand why it works as I expected it to freeze when I call printf from multiple tasks. I came across this github issue.
From reading the issue, it appears that under the hood, there is a mutex that enables this capability. Is that right?
If that is the case, do I still need to use a mutex in my tasks if I were to call printf?
Would this apply to other hardware interfaces? For e.g.: i2c to 2 different sensors from two tasks without a mutex lock.
I am able to call printf functions without acquiring any mutex locks. I created 4 tasks and called printf from all of them. They seem to work without freezing up.
I am trying to understand why it works as I expected it to freeze when I call printf from multiple tasks. I came across this github issue.
From reading the issue, it appears that under the hood, there is a mutex that enables this capability. Is that right?
If that is the case, do I still need to use a mutex in my tasks if I were to call printf?
Would this apply to other hardware interfaces? For e.g.: i2c to 2 different sensors from two tasks without a mutex lock.
Statistics: Posted by yamanoorsai — Tue Sep 10, 2024 3:45 pm — Replies 2 — Views 60