mirror of https://github.com/ARMmbed/mbed-os.git
Once a fatal error is in progress, it's not useful to trap RTX errors or mutex problems, so short-circuit the checks. This makes it more likely that we may be able to get the console initialised if it is being written to for the first time by `mbed_error` in a difficult context - such as an RTX error callback from inside an SVCall. For example, the one-line program osMutexAcquire(NULL, 0); will generate an RTX error trap, then `mbed_error` will try to call `write(STDERR_FILENO)` to print the error, which will prompt mbed_retarget to construct a singleton `UARTSerial`. This would trap in the mutex for the singleton or the construction of the UARTSerial itself, if we didn't allow this leniency. If we clear the mutex checks, then `UARTSerial::write_unbuffered` will work. |
||
|---|---|---|
| .. | ||
| TARGET_CORTEX | ||
| ConditionVariable.cpp | ||
| ConditionVariable.h | ||
| EventFlags.cpp | ||
| EventFlags.h | ||
| Kernel.cpp | ||
| Kernel.h | ||
| Mail.h | ||
| MemoryPool.h | ||
| Mutex.cpp | ||
| Mutex.h | ||
| Queue.h | ||
| RtosTimer.cpp | ||
| RtosTimer.h | ||
| Semaphore.cpp | ||
| Semaphore.h | ||
| ThisThread.cpp | ||
| ThisThread.h | ||
| Thread.cpp | ||
| Thread.h | ||
| mbed_lib.json | ||
| rtos.h | ||
| rtos_handlers.h | ||
| rtos_idle.h | ||