Hi Mark, There is a pair of functions console_lock() and console_unlock() that does just what you want.
best regards Jerzy niedz., 20 paź 2019 o 09:50 Mark Ruys <mark.r...@sensoterra.com> napisał(a): > We have an application with multiple tasks logging to the console using > console_printf(). So often the console output gets cluttered. What’s the > best way to prevent this? > > I could call console_blocking_mode(), but I read: > > /* > * Blocking transmit. ***Note that this should only be used with console. > * And only when MCU is about to restart, to write final log messages*** > * > * @param dev Uart device in question > */ > static inline void > uart_blocking_tx(struct uart_dev *dev, uint8_t byte) > { > dev->ud_funcs.uf_blocking_tx(dev, byte); > } > > So far my best guess would be protect calls to console_printf() with a > mutex. > > Thanks, > > Mark