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 kconfig: logging: Add LOG_MIPI_SYST_ARGS_BUFFER_SIZE option. 2022-08-17 12:07:08 +02:00
CMakeLists.txt logging: cmake: Remove duplicate source entry 2023-07-07 09:20:11 +02:00
Kconfig log_core: Add Kconfig symbol for init priority 2022-12-14 15:16:54 +01:00
Kconfig.filtering logging: Add frontend support to v2 2022-03-14 14:08:49 -04:00
Kconfig.formatting logging: Add option to store tid in the log message 2023-08-31 14:08:19 +02:00
Kconfig.frontends logging: Remove logging v1 from the logging 2022-06-16 10:51:15 -04:00
Kconfig.links logging: Add ipc_service log link 2022-10-17 10:16:53 +02:00
Kconfig.misc logging: Initial multidomain support 2022-10-17 10:16:53 +02:00
Kconfig.mode logging: Add an option for a custom log header 2022-12-22 11:09:59 +01:00
Kconfig.processing Logging: improve help message of LOG_PRINTK Kconfig option 2023-10-13 22:36:47 +03:00
Kconfig.template.log_config logging: Changed log template to consider default log level 2023-04-05 13:47:06 +02:00
Kconfig.template.log_config_inherit Logging: Add Kconfig template for log inheriting 2022-11-30 14:37:58 +01:00
Kconfig.template.log_format_config logging: enable setting custom logging output func 2022-10-06 19:15:35 -04:00
log_cache.c logging: fix few mismatched CONTAINER_OF 2023-08-31 14:08:31 +02:00
log_cache.h logging: Add log_cache module for caching remote names 2022-10-17 10:16:53 +02:00
log_cmds.c iterable_sections: move to specific header 2023-05-22 10:42:30 +02:00
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 logging: Add ipc_service log link 2022-10-17 10:16:53 +02:00
log_mgmt.c logging: return actual filter level when runtime filter is disabled 2023-09-29 09:48:49 +02:00
log_minimal.c subsystems: migrate includes to <zephyr/...> 2022-05-09 12:07:35 +02:00
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 logging: Add remote link and backend 2022-10-17 10:16:53 +02:00
log_output.c logging: log_output: Minor code cleanup 2023-09-29 09:48:57 +02:00
log_output_custom.c logging: support custom timestamp formatting 2023-04-04 13:41:17 +02:00
log_output_dict.c logging: Removing v2 suffix from logging names 2022-06-23 15:46:37 -04:00
log_output_syst.c logging: rename shadow variables 2023-08-22 11:39:58 +02:00