137097f5c3
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
|
||
---|---|---|
.. | ||
backends | ||
mipi_syst | ||
CMakeLists.txt | ||
Kconfig | ||
Kconfig.filtering | ||
Kconfig.formatting | ||
Kconfig.frontends | ||
Kconfig.links | ||
Kconfig.misc | ||
Kconfig.mode | ||
Kconfig.processing | ||
Kconfig.template.log_config | ||
Kconfig.template.log_config_inherit | ||
Kconfig.template.log_format_config | ||
log_cache.c | ||
log_cache.h | ||
log_cmds.c | ||
log_core.c | ||
log_frontend_dict_uart.c | ||
log_link_ipc_service.c | ||
log_mgmt.c | ||
log_minimal.c | ||
log_msg.c | ||
log_multidomain_link.c | ||
log_output.c | ||
log_output_custom.c | ||
log_output_dict.c | ||
log_output_syst.c |