Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 5200

General • Trying to understand printf on FreeRTOS SMP on Pico

$
0
0
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.

Statistics: Posted by yamanoorsai — Tue Sep 10, 2024 3:45 pm — Replies 2 — Views 60



Viewing all articles
Browse latest Browse all 5200

Trending Articles


FLASHBACK WITH SIRASA FM AT GALGAMUWA 2022


Mp3 Download: Mdu - Mazola


Imitation gun was fired at motorist in Leicester road-rage incident


Ndebele names


MCKINNEY EMALINE “EMMA” OF WES...


Okra & Motia — The Workshop (Prod by Hammer)


Skint TV teen to be sentenced


Moondru Mudichu 19-09-2017 – Polimer tv Serial


YOSVANI JAMES Arrested by Miami-Dade County Corrections on Jan 10, 2017


Stories • Goddess Stepmom