mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-29 13:48:21 +00:00
logging: make term and printf smp safe
This commit is contained in:
@@ -1,3 +1,7 @@
|
||||
#include <mutex.h>
|
||||
|
||||
mutex_t printf_mutex;
|
||||
|
||||
static void nohook(char c) {
|
||||
|
||||
}
|
||||
@@ -12,3 +16,7 @@ void _putchar(char c) {
|
||||
void logging_sethook(void (*fun)(char)) {
|
||||
hook = fun;
|
||||
}
|
||||
|
||||
void logging_init() {
|
||||
MUTEX_INIT(&printf_mutex);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user