From d79f0d3e528edb97573fae92b5faa5e3ea34e98d Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 23 Jan 2001 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2001-01-23 --- pc/apm.c | 1 - pc/etherwavelan.c | 5 ++--- pc/fns.h | 3 +-- pc/main.c | 11 +++++++++++ 4 files changed, 14 insertions(+), 6 deletions(-) diff --git a/pc/apm.c b/pc/apm.c index c533c5fdb176e737551e570c49310fac23eabd1e..39e6eb8e8982be65ec7ef15f276c4b04b76324ed 100644 --- a/pc/apm.c +++ b/pc/apm.c @@ -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); diff --git a/pc/etherwavelan.c b/pc/etherwavelan.c index 5e6d95dc3ddfa1d405584f2aed04d46ca0c4401b..c733dd67a912b46fb0e37aaa08174538639e0380 100644 --- a/pc/etherwavelan.c +++ b/pc/etherwavelan.c @@ -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. diff --git a/pc/fns.h b/pc/fns.h index 0729055afd38c312f500ae2cce542d4d6bf3c597..6841d974650eb49c737e63a64186da626ec51047 100644 --- a/pc/fns.h +++ b/pc/fns.h @@ -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); diff --git a/pc/main.c b/pc/main.c index 82f7058ebba5922aa6660c2d3725724f83e84b54..00da260dfc2318db08e2f9723fe68ca83b41ab05 100644 --- a/pc/main.c +++ b/pc/main.c @@ -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(); +}