zephyr/subsys/logging
Luca Burelli 802156c0cb logging: improve log_flush() robustness
The 'log_flush()' function is used to wait for all pending log messages
to be processed by the background thread. This is performed by polling
the 'log_data_pending()' function, which scans all available buffers.

The log core already provides a 'buffered_cnt' variable that keeps track
of the number of pending messages. This variable is updated atomically
and could be a more efficient implementation for that check.

This commit moves the 'buffered_cnt' decrement _after_ the message
processing and buffer release, to ensure that the variable reflects
the number of pending messages at any moment in time.

The 'log_data_pending()' function is then replaced with a direct check
of the 'buffered_cnt' variable.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-02-11 15:39:29 +01:00
..
backends logging: fs backend: simplify checking if file exists 2025-02-07 14:33:35 +01:00
frontends logging: frontends: stmesp: Fix logging single argument log twice 2025-01-24 15:43:19 +01:00
mipi_syst
CMakeLists.txt
Kconfig
Kconfig.filtering
Kconfig.formatting
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 logging: log_cmds: init uninitialized backend on log_go() 2025-02-04 15:00:58 +01:00
log_core.c logging: improve log_flush() robustness 2025-02-11 15:39:29 +01:00
log_link_ipc_service.c
log_mgmt.c logging: init backend id regardless of autostart 2025-02-04 15:00:58 +01:00
log_minimal.c
log_msg.c
log_multidomain_link.c
log_output_custom.c
log_output_dict.c
log_output_syst.c
log_output.c