Handle IRQs inside the kernel
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m42s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m42s
This commit is contained in:
@@ -60,6 +60,30 @@ void debugprintf (const char* fmt, ...) {
|
||||
spin_unlock (&serial_lock, f1);
|
||||
}
|
||||
|
||||
void debugprintf_nolock (const char* fmt, ...) {
|
||||
uint64_t f1;
|
||||
|
||||
if (!debug_is_init)
|
||||
return;
|
||||
|
||||
char buffer[BUFFER_SIZE];
|
||||
memset (buffer, 0, sizeof (buffer));
|
||||
|
||||
va_list ap;
|
||||
va_start (ap, fmt);
|
||||
vsnprintf (buffer, sizeof (buffer), fmt, ap);
|
||||
va_end (ap);
|
||||
|
||||
buffer[sizeof (buffer) - 1] = '\0';
|
||||
|
||||
const char* p = buffer;
|
||||
|
||||
while (*p) {
|
||||
debug_serial_write (*p);
|
||||
p++;
|
||||
}
|
||||
}
|
||||
|
||||
/* Initialize serial */
|
||||
void debug_init (void) {
|
||||
outb (PORT_COM1 + 1, 0x00);
|
||||
|
||||
Reference in New Issue
Block a user