diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-09-20 15:33:08 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-09-20 15:33:08 -0400 |
commit | ee2efa7303077ce98a745f637e213ba9a0965811 (patch) | |
tree | 421bea0de69c8fcc61122d96409218799efbfb0a /src/clock.c | |
parent | 40f5b5aa1ecb189353e79009f49276193b3a87e9 (diff) | |
download | seabios-hppa-ee2efa7303077ce98a745f637e213ba9a0965811.zip seabios-hppa-ee2efa7303077ce98a745f637e213ba9a0965811.tar.gz seabios-hppa-ee2efa7303077ce98a745f637e213ba9a0965811.tar.bz2 |
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.c | 4 |
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); } |