Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
stdio_thread.cpp
00001 #include <stdarg.h> 00002 #include <stdio.h> 00003 #include "mbed.h" 00004 00005 #include "stdio_thread.h" 00006 00007 Mutex printf_mutex; 00008 00009 int safe_printf(const char *format, ...) { 00010 00011 printf_mutex.lock(); 00012 00013 va_list args; 00014 va_start(args, format); 00015 int num_bytes = vprintf(format, args); 00016 00017 va_end(args); 00018 printf_mutex.unlock(); 00019 00020 return num_bytes; 00021 }
Generated on Sun Jul 17 2022 23:10:29 by
1.7.2