mirror of
https://github.com/BoredDevNL/BoredOS.git
synced 2026-05-15 10:48:38 +00:00
FIX: Flickering when serial output occurs.
This commit is contained in:
parent
75278b9a27
commit
ecaa5f60f7
1 changed files with 6 additions and 1 deletions
|
|
@ -85,11 +85,16 @@ void kconsole_write(const char *s) {
|
|||
if (!s) return;
|
||||
|
||||
uint64_t flags = spinlock_acquire_irqsave(&console_lock);
|
||||
if (!kconsole_active) {
|
||||
spinlock_release_irqrestore(&console_lock, flags);
|
||||
return;
|
||||
}
|
||||
|
||||
while (*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();
|
||||
spinlock_release_irqrestore(&console_lock, flags);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue