@@ -127,7 +127,9 @@ MBED_NORETURN void mbed_die(void);
127
127
/** Print out an error message. This is typically called when
128
128
* handling a crash.
129
129
*
130
- * @note Synchronization level: Interrupt safe
130
+ * @note Synchronization level: Interrupt safe, as long as the
131
+ * FileHandle::write of the stderr device is. See mbed_error_puts
132
+ * for more information.
131
133
* @note This uses an internal 128-byte buffer to format the string,
132
134
* so the output may be truncated. If you need to write a potentially
133
135
* long string, use mbed_error_puts.
@@ -145,7 +147,9 @@ void mbed_error_printf(const char *format, ...) MBED_PRINTF(1, 2);
145
147
/** Print out an error message. Similar to mbed_error_printf
146
148
* but uses a va_list.
147
149
*
148
- * @note Synchronization level: Interrupt safe
150
+ * @note Synchronization level: Interrupt safe, as long as the
151
+ * FileHandle::write of the stderr device is. See mbed_error_puts
152
+ * for more information.
149
153
*
150
154
* @param format C string that contains data stream to be printed.
151
155
* @param arg Variable arguments list
@@ -160,7 +164,13 @@ void mbed_error_vprintf(const char *format, va_list arg) MBED_PRINTF(1, 0);
160
164
* length. Unlike standard puts, but like standard fputs, this does not
161
165
* append a '\n' character.
162
166
*
163
- * @note Synchronization level: Interrupt safe
167
+ * @note Synchronization level: Interrupt safe, as long as the
168
+ * FileHandle::write of the stderr device is. The default
169
+ * serial console is safe, either buffered or not. If the
170
+ * console has not previously been initialized, an attempt
171
+ * to use this from interrupt may during console initialization.
172
+ * Special handling of `mbed_error` relaxes various system traps
173
+ * to increase the chance of initialization working.
164
174
*
165
175
* @param str C string that contains data stream to be printed.
166
176
*
0 commit comments