lib: os: add a header for printk hook functions

Add a zephyr/printk.h header for the __printk_hook functions, these are
currently manually declared by all console drivers for no good reason.

Move the documentation into the header and also unify the way that
console drivers call the function.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
This commit is contained in:
Fabio Baltieri 2024-07-23 12:01:03 +01:00 committed by Anas Nashif
commit ef14c9b867
15 changed files with 59 additions and 80 deletions

View file

@ -5,14 +5,13 @@
*/
#include <zephyr/ztest.h>
#include <zephyr/sys/printk-hooks.h>
#define BUF_SZ 1024
static int pos;
char pk_console[BUF_SZ];
void __printk_hook_install(int (*fn)(int));
void *__printk_get_hook(void);
int (*_old_char_out)(int);
#if defined(CONFIG_PICOLIBC)