diff --git a/src/dbg.cpp b/src/dbg.cpp index 822d780..34a6ca9 100644 --- a/src/dbg.cpp +++ b/src/dbg.cpp @@ -1,6 +1,9 @@ #include #include +/* WARNING: use of static variable is not thread safe!! */ +static char string[32]; + /* Never call this function directly: always use the printk, * which disables and reenables interrupts */ extern "C" int c_printk(const char* msg) { @@ -18,8 +21,6 @@ extern "C" int printkl(const char* msg) { return 0; } -static char string[11]; -/* TODO: WARNING: this is not thread safe!! */ extern "C" const char* itoa(uint32_t n) { string[10] = '\0'; string[0] = '0'; string[1] = 'x';