M pc/apm.c => pc/apm.c +0 -1
@@ 157,7 157,6 @@ apmlink(void)
loadgdt();
addarchfile("apm", 0660, apmread, apmwrite);
- doze = halt;
print("apm0: configured cbase %.8lux off %.8lux\n", ax<<4, ebx);
M pc/etherwavelan.c => pc/etherwavelan.c +2 -3
@@ 10,7 10,7 @@
For known BUGS see the comments below. Besides,
the driver keeps interrupts disabled for just too
long. When it gets robust, locks should be revisited.
- WEP is not tested (see BUGs too).
+ (see BUGs).
*/
#include "u.h"
@@ 251,7 251,7 @@ struct Stats
ulong nalloc; // allocation (reclaim) events
ulong ninfo;
ulong nidrop;
- ulong nwatchdogs; // transmits time outs, actually
+ ulong nwatchdogs; // transmit time outs, actually
};
struct Ctlr
@@ 290,7 290,6 @@ struct Ctlr
WStats;
};
-
// w_... routines do not ilock the Ctlr and should
// be called locked.
M pc/fns.h => pc/fns.h +1 -2
@@ 25,7 25,6 @@ int dmadone(int);
void dmaend(int);
int dmainit(int, int);
long dmasetup(int, void*, long, int);
-void (*doze)(void);
#define evenaddr(x) /* x86 doesn't care */
void fpenv(FPsave*);
void fpinit(void);
@@ 49,7 48,7 @@ uvlong i8253read(uvlong*);
void i8259init(void);
int i8259enable(Vctl*);
void idle(void);
-#define idlehands() if(doze==0);else doze() /* nothing to do in the runproc */
+void idlehands(void);
int inb(int);
void insb(int, void*, int);
ushort ins(int);
M pc/main.c => pc/main.c +11 -0
@@ 759,3 759,14 @@ cistrncmp(char *a, char *b, int n)
return 0;
}
+
+/*
+ * put the processor in the halt state if we've no processes to run.
+ * an interrupt will get us going again.
+ */
+void
+idlehands(void)
+{
+ if(conf.nmach == 1)
+ halt();
+}