Signed-off-by: Kevin O'Connor kevin@koconnor.net --- src/apm.c | 4 ++-- src/boot.c | 2 +- src/clock.c | 2 +- src/floppy.c | 4 ++-- src/kbd.c | 2 +- src/stacks.c | 2 +- src/util.c | 2 +- src/util.h | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/src/apm.c b/src/apm.c index c497dbe..5e45b77 100644 --- a/src/apm.c +++ b/src/apm.c @@ -9,7 +9,7 @@ #include "farptr.h" // GET_VAR #include "bregs.h" // struct bregs #include "ioport.h" // outb -#include "util.h" // wait_irq +#include "util.h" // dprintf #include "config.h" // CONFIG_* #include "biosvar.h" // GET_GLOBAL
@@ -94,7 +94,7 @@ handle_155304(struct bregs *regs) static void handle_155305(struct bregs *regs) { - wait_irq(); + yield_toirq(); set_success(regs); }
diff --git a/src/boot.c b/src/boot.c index 7676eb7..91663a2 100644 --- a/src/boot.c +++ b/src/boot.c @@ -627,7 +627,7 @@ boot_fail(void) for (;;) { if (retrytime != (u32)-1 && check_timer(end)) break; - wait_irq(); + yield_toirq(); } printf("Rebooting.\n"); struct bregs br; diff --git a/src/clock.c b/src/clock.c index c66c3f0..97d5301 100644 --- a/src/clock.c +++ b/src/clock.c @@ -612,7 +612,7 @@ handle_1586(struct bregs *regs) return; } while (!statusflag) - wait_irq(); + yield_toirq(); set_success(regs); }
diff --git a/src/floppy.c b/src/floppy.c index 383744a..72bc79b 100644 --- a/src/floppy.c +++ b/src/floppy.c @@ -9,7 +9,7 @@ #include "disk.h" // DISK_RET_SUCCESS #include "config.h" // CONFIG_FLOPPY #include "biosvar.h" // SET_BDA -#include "util.h" // wait_irq +#include "util.h" // dprintf #include "cmos.h" // inb_cmos #include "pic.h" // eoi_pic1 #include "bregs.h" // struct bregs @@ -192,7 +192,7 @@ wait_floppy_irq(void) v = GET_BDA(floppy_recalibration_status); if (v & FRS_TIMEOUT) break; - // Could use wait_irq() here, but that causes issues on + // Could use yield_toirq() here, but that causes issues on // bochs, so use yield() instead. yield(); } diff --git a/src/kbd.c b/src/kbd.c index 1977c5d..fdb61d4 100644 --- a/src/kbd.c +++ b/src/kbd.c @@ -87,7 +87,7 @@ dequeue_key(struct bregs *regs, int incr, int extended) regs->flags |= F_ZF; return; } - wait_irq(); + yield_toirq(); }
u8 ascii_code = GET_FARVAR(SEG_BDA, *(u8*)(buffer_head+0)); diff --git a/src/stacks.c b/src/stacks.c index 0371330..7b29b8e 100644 --- a/src/stacks.c +++ b/src/stacks.c @@ -128,7 +128,7 @@ ASM16(
// Wait for next irq to occur. void -wait_irq(void) +yield_toirq(void) { if (MODESEGMENT) { asm volatile("sti ; hlt ; cli ; cld": : :"memory"); diff --git a/src/util.c b/src/util.c index 53ef84d..c0c40e3 100644 --- a/src/util.c +++ b/src/util.c @@ -335,6 +335,6 @@ get_keystroke(int msec) return get_raw_keystroke(); if (check_timer(end)) return -1; - wait_irq(); + yield_toirq(); } } diff --git a/src/util.h b/src/util.h index c323449..dece637 100644 --- a/src/util.h +++ b/src/util.h @@ -236,7 +236,7 @@ extern struct thread_info MainThread; extern int CanPreempt; struct thread_info *getCurThread(void); void yield(void); -void wait_irq(void); +void yield_toirq(void); void run_thread(void (*func)(void*), void *data); void wait_threads(void); struct mutex_s { u32 isLocked; };