tmedicci commented on code in PR #9404: URL: https://github.com/apache/nuttx/pull/9404#discussion_r1209241431
########## arch/xtensa/src/common/xtensa_nputs.c: ########## @@ -39,8 +40,14 @@ void up_nputs(const char *str, size_t len) Review Comment: > syslog can be called in interrupt context, we need some special handle like serial driver: https://github.com/apache/nuttx/blob/master/drivers/serial/serial.c#L1189-L1209 Yes, but nowadays there are no problems calling syslog from ISR: - if CONFIG_SYSLOG_INTBUFFER is set, then it'd be flushed outside the interrupt handler by [`syslog_write`](https://github.com/apache/incubator-nuttx/blob/2e54df0f35b743df26f5737aa6a9d7c74f12aa85/drivers/syslog/syslog_write.c#L140); - Otherwise, the syslog will call the registered `sc_force` ([`syslog_default_putc`](syslog_default_putc) for the serial console). That would call `up_putc`. Considering syslog, it wouldn't call `up_nputs` during the interrupt handler. Do you think we still need to provide some checks to avoid it being used directly from the ISR? (please consider that we already have https://github.com/apache/incubator-nuttx/blob/ef65d443ade0877f4b43a133e54565ba90640714/sched/semaphore/sem_wait.c#L80) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
