SuperHouse / esp-open-rtos

Open source FreeRTOS-based ESP8266 software framework
BSD 3-Clause "New" or "Revised" License
1.53k stars 491 forks source link

newlib: skip locking when within the NMI Irq. #587

Closed ourairquality closed 6 years ago

ourairquality commented 6 years ago

NMI Irq error paths call into printf which will use the newlib locks but these can not be used within the NMI, a task switch can not occur here. This case would be a terminal error path that is attempting to write some debug message in the process, so just bail out of the locking in this case. As a warning a ':' character is emitted and this will typically prefix lines emitted in this context - it would be an error for this path to be take in normal operation.