zephyr/subsys/logging
Christopher Friedt 137097f5c3 logging: log_core: correct timeout of -1 ms to K_FOREVER
Many releases ago, specifying to block indefinitely in the log
processing thread would do just that.

However, a subtle bug was introduced  such that specifying -1
for `CONFIG_LOG_BLOCK_IN_THREAD_TIMEOUT_MS` would have the
exact opposite effect than what was intended.

As per Kconfig, a value of -1 should translate to a timeout of
`K_FOREVER`. However, conversion via `K_MSEC(-1)` results in
a `k_timeout_t` that is equal to `K_NO_WAIT` rather than the
intent which is `K_FOREVER`.

Add a dedicated check to to ensure that a value of -1 is
correctly interpreted as `K_FOREVER` in `log_core.c`.

For reference, the blocking feature was described in #15196,
added in #16194, and it would appear that the regression
happened in c5f2cdef09.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-10-16 12:06:42 +02:00
..
backends logging: net: changing syslog server address while running bug 2023-09-29 16:27:04 +02:00
mipi_syst
CMakeLists.txt
Kconfig
Kconfig.filtering
Kconfig.formatting logging: Add option to store tid in the log message 2023-08-31 14:08:19 +02:00
Kconfig.frontends
Kconfig.links
Kconfig.misc
Kconfig.mode
Kconfig.processing Logging: improve help message of LOG_PRINTK Kconfig option 2023-10-13 22:36:47 +03:00
Kconfig.template.log_config
Kconfig.template.log_config_inherit
Kconfig.template.log_format_config
log_cache.c logging: fix few mismatched CONTAINER_OF 2023-08-31 14:08:31 +02:00
log_cache.h
log_cmds.c
log_core.c logging: log_core: correct timeout of -1 ms to K_FOREVER 2023-10-16 12:06:42 +02:00
log_frontend_dict_uart.c logging: fix few mismatched CONTAINER_OF 2023-08-31 14:08:31 +02:00
log_link_ipc_service.c
log_mgmt.c logging: return actual filter level when runtime filter is disabled 2023-09-29 09:48:49 +02:00
log_minimal.c
log_msg.c logging: Add option to store tid in the log message 2023-08-31 14:08:19 +02:00
log_multidomain_link.c
log_output_custom.c
log_output_dict.c
log_output_syst.c
log_output.c logging: log_output: Minor code cleanup 2023-09-29 09:48:57 +02:00