Example of mutex usage to protect shared access to stdio (printf). Note that this kind of protection is needed in case of Cortex-M0 MCU-s which use C microlib. Larger MCUs (like Cortex M3), however, use the C stdlib which already provides a mutex to protect access to stdio.

Dependencies:   mbed-rtos mbed

Auto generated API documentation and code listings for 10_rtos_mutex

Code

main.cpp [code]