summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrans Kaashoek <[email protected]>2016-08-18 21:02:05 -0400
committerFrans Kaashoek <[email protected]>2016-08-18 21:02:05 -0400
commit1fc87f367c9b3a1125f55e0751909af1e7dfbb8a (patch)
tree99049f41265f4fdf3217f120e8b16b2a8d692952
parent5faed8ba6489c60e2df4971af0bd28a6af55b00a (diff)
downloadxv6-labs-1fc87f367c9b3a1125f55e0751909af1e7dfbb8a.tar.gz
xv6-labs-1fc87f367c9b3a1125f55e0751909af1e7dfbb8a.tar.bz2
xv6-labs-1fc87f367c9b3a1125f55e0751909af1e7dfbb8a.zip
Coding style (thanks to phf).
-rw-r--r--lapic.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lapic.c b/lapic.c
index 4da4214..d88a702 100644
--- a/lapic.c
+++ b/lapic.c
@@ -25,7 +25,7 @@
#define DEASSERT 0x00000000
#define LEVEL 0x00008000 // Level triggered
#define BCAST 0x00080000 // Send to all APICs, including self.
- #define BUSY 0x00001000
+ /#define BUSY 0x00001000
#define FIXED 0x00000000
#define ICRHI (0x0310/4) // Interrupt Command [63:32]
#define TIMER (0x0320/4) // Local Vector Table 0 (TIMER)
@@ -211,17 +211,17 @@ void cmostime(struct rtcdate *r)
bcd = (sb & (1 << 2)) == 0;
// make sure CMOS doesn't modify time while we read it
- for (;;) {
+ for(;;) {
fill_rtcdate(&t1);
- if (cmos_read(CMOS_STATA) & CMOS_UIP)
+ if(cmos_read(CMOS_STATA) & CMOS_UIP)
continue;
fill_rtcdate(&t2);
- if (memcmp(&t1, &t2, sizeof(t1)) == 0)
+ if(memcmp(&t1, &t2, sizeof(t1)) == 0)
break;
}
// convert
- if (bcd) {
+ if(bcd) {
#define CONV(x) (t1.x = ((t1.x >> 4) * 10) + (t1.x & 0xf))
CONV(second);
CONV(minute);