mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 02:16:58 +00:00
FIX: Flickering when serial output occurs.
This commit is contained in:
@@ -85,11 +85,16 @@ void kconsole_write(const char *s) {
|
|||||||
if (!s) return;
|
if (!s) return;
|
||||||
|
|
||||||
uint64_t flags = spinlock_acquire_irqsave(&console_lock);
|
uint64_t flags = spinlock_acquire_irqsave(&console_lock);
|
||||||
|
if (!kconsole_active) {
|
||||||
|
spinlock_release_irqrestore(&console_lock, flags);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
while (*s) {
|
while (*s) {
|
||||||
kconsole_putc_nolock(*s++);
|
kconsole_putc_nolock(*s++);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Flip buffer after a write batch during boot
|
// Flip once after a write batch to keep console updates coherent.
|
||||||
graphics_flip_buffer();
|
graphics_flip_buffer();
|
||||||
spinlock_release_irqrestore(&console_lock, flags);
|
spinlock_release_irqrestore(&console_lock, flags);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user