Implement lock IRQ nesting via stack variables/contexts
All checks were successful
Build documentation / build-and-deploy (push) Successful in 21s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 21s
This commit is contained in:
@@ -35,6 +35,8 @@ static void amd64_debug_serial_write (char x) {
|
||||
* Formatted printing to serial. serial_lock ensures that all prints are atomic.
|
||||
*/
|
||||
void debugprintf (const char* fmt, ...) {
|
||||
spin_lock_ctx_t ctxdbgp;
|
||||
|
||||
if (!debug_init)
|
||||
return;
|
||||
|
||||
@@ -50,14 +52,14 @@ void debugprintf (const char* fmt, ...) {
|
||||
|
||||
const char* p = buffer;
|
||||
|
||||
spin_lock (&serial_lock);
|
||||
spin_lock (&serial_lock, &ctxdbgp);
|
||||
|
||||
while (*p) {
|
||||
amd64_debug_serial_write (*p);
|
||||
p++;
|
||||
}
|
||||
|
||||
spin_unlock (&serial_lock);
|
||||
spin_unlock (&serial_lock, &ctxdbgp);
|
||||
}
|
||||
|
||||
/* Initialize serial */
|
||||
|
||||
Reference in New Issue
Block a user