summaryrefslogtreecommitdiff
path: root/src/clock.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2009-09-20 15:33:08 -0400
committerKevin O'Connor <kevin@koconnor.net>2009-09-20 15:33:08 -0400
commitee2efa7303077ce98a745f637e213ba9a0965811 (patch)
tree421bea0de69c8fcc61122d96409218799efbfb0a /src/clock.c
parent40f5b5aa1ecb189353e79009f49276193b3a87e9 (diff)
downloadqemu-seabios-ee2efa7303077ce98a745f637e213ba9a0965811.tar.gz
Support sleeping until an irq fires, and use where applicable.
Add wait_irq() - it's more efficient than looping with cpu_relax(). Also, move kbd irq enables down - only kbd_command needs it. Also, make some minor code layout improvements to kbd.c.
Diffstat (limited to 'src/clock.c')
-rw-r--r--src/clock.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/clock.c b/src/clock.c
index 9009d49..ee2d05f 100644
--- a/src/clock.c
+++ b/src/clock.c
@@ -488,10 +488,8 @@ handle_1586(struct bregs *regs)
set_code_fail(regs, RET_ECLOCKINUSE);
return;
}
- irq_enable();
while (!statusflag)
- cpu_relax();
- irq_disable();
+ wait_irq();
set_success(regs);
}