syslog: Add sc_write_force callback

It is used to write the log message to the channel immediately
when the log message is generated in the interrupt context, which
is faster than the normal force callback.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2023-06-21 08:16:55 +08:00
committed by Alan Carvalho de Assis
parent e62c915972
commit efd1b838e6
7 changed files with 75 additions and 68 deletions
+6 -5
View File
@@ -100,11 +100,12 @@ typedef CODE void (*syslog_close_t)(FAR struct syslog_channel_s *channel);
struct syslog_channel_ops_s
{
syslog_putc_t sc_putc; /* Normal buffered output */
syslog_putc_t sc_force; /* Low-level output for interrupt handlers */
syslog_flush_t sc_flush; /* Flush buffered output (on crash) */
syslog_write_t sc_write; /* Write multiple bytes */
syslog_close_t sc_close; /* Channel close callback */
syslog_putc_t sc_putc; /* Normal buffered output */
syslog_putc_t sc_force; /* Low-level output for interrupt handlers */
syslog_flush_t sc_flush; /* Flush buffered output (on crash) */
syslog_write_t sc_write; /* Write multiple bytes */
syslog_write_t sc_write_force; /* Write multiple bytes for interrupt handlers */
syslog_close_t sc_close; /* Channel close callback */
};
/* This structure provides the interface to a SYSLOG channel */