Repos / kernel.git / commitdiff
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: cd15b07)
raw | patch | inline | side by side (parent: cd15b07)
| author | zhaoyanbai <zhaoyanbai@126.com> | |
| Mon, 26 Jan 2026 07:59:29 +0000 (15:59 +0800) | ||
| committer | zhaoyanbai <zhaoyanbai@126.com> | |
| Mon, 26 Jan 2026 07:59:29 +0000 (15:59 +0800) |
| kernel/printk.c | patch | blob | history |
diff --git a/kernel/printk.c b/kernel/printk.c
--- a/kernel/printk.c
+++ b/kernel/printk.c
int printlo(unsigned int xpos, unsigned int ypos, const char* fmtstr, ...) {
static char plobuf[1024];
char* args = (char*)(((char*)&fmtstr) + 4);
- ENTER_CRITICAL_ZONE(EFLAGS);
+
+ unsigned long eflags;
+ irq_save(eflags);
+
int size = vsprintf(plobuf, fmtstr, args);
tty_write_at(monitor_tty, xpos, ypos, plobuf, (size_t)size);
- LEAVE_CRITICAL_ZONE(EFLAGS);
+ irq_restore(eflags);
+
return 0;
}