summaryrefslogtreecommitdiff
path: root/os
diff options
context:
space:
mode:
authorCharles.Forsyth <devnull@localhost>2008-11-19 01:52:07 +0000
committerCharles.Forsyth <devnull@localhost>2008-11-19 01:52:07 +0000
commitae8d2f526e6b6c8aee5e2e126dfc50b067922fc9 (patch)
tree3835b933d04cba4a863dc5ab7f8110ca0a7728bf /os
parentd84d386d607c31f7e556a85afa688564735d19b7 (diff)
20081119-0151
Diffstat (limited to 'os')
-rw-r--r--os/pc/fns.h2
-rw-r--r--os/pc/main.c11
2 files changed, 12 insertions, 1 deletions
diff --git a/os/pc/fns.h b/os/pc/fns.h
index d4b61034..de8cfbe1 100644
--- a/os/pc/fns.h
+++ b/os/pc/fns.h
@@ -48,7 +48,7 @@ int i8259enable(Vctl*);
int i8259vecno(int);
int i8259disable(int);
void idle(void);
-#define idlehands() /* nothing to do in the runproc */
+void idlehands(void);
int inb(int);
void insb(int, void*, int);
ushort ins(int);
diff --git a/os/pc/main.c b/os/pc/main.c
index df4f240e..11e8d4db 100644
--- a/os/pc/main.c
+++ b/os/pc/main.c
@@ -455,3 +455,14 @@ isaconfig(char *class, int ctlrno, ISAConf *isa)
}
return 1;
}
+
+/*
+ * 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();
+}