From b020507a84c1ed321d019e4551b60a766bf11a71 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 17 Feb 1993 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1993-02-17 --- pc/main.c | 5 +++-- pc/trap.c | 37 +++++++++++++++++++++++++++++++++---- ss/screen.c | 2 +- 3 files changed, 37 insertions(+), 7 deletions(-) diff --git a/pc/main.c b/pc/main.c index 0ac06890bfb7dcc265edbdd2d53e9abbdbc76009..164e22864c1b8df67e0fb06a2a674bd9ba228075 100644 --- a/pc/main.c +++ b/pc/main.c @@ -264,6 +264,7 @@ confinit(void) l--; if(*l != x) break; + memset((char*)(KZERO|((i-1)*MB)), 0, MB); x += 0x3141526; } i--; @@ -275,8 +276,8 @@ confinit(void) pcnt = (1<= Maxhandler) + panic("out of interrupt handlers"); + h = &halloc.h[halloc.free++]; + h->next = halloc.ivec[v]; + h->r = r; + halloc.ivec[v] = h; + unlock(&halloc); /* * enable corresponding interrupt in 8259 @@ -201,6 +226,7 @@ trap(Ureg *ur) int v, user; int c; char buf[ERRLEN]; + Handler *h; v = ur->trap; @@ -222,7 +248,7 @@ trap(Ureg *ur) uartintr0(ur); } - if(v>=256 || ivec[v] == 0){ + if(v>=256 || (h = halloc.ivec[v]) == 0){ if(v == 13) return; if(v <= 16){ @@ -239,7 +265,10 @@ trap(Ureg *ur) return; } - (*ivec[v])(ur); + do { + (*h->r)(ur); + h = h->next; + } while(h); /* * check user since syscall does its own notifying diff --git a/ss/screen.c b/ss/screen.c index 5847d5892d361aabf3fcf6cce8e967682b40280a..90fc155fc8358a04dacc729024a29db408f8917f 100644 --- a/ss/screen.c +++ b/ss/screen.c @@ -69,7 +69,7 @@ struct screens }screens[] = { { "bwtwo", 1152, 900, 0, 0x400000 }, { "cgsix", 1152, 900, 3, 0x200000 }, - { "cgthree", 1152, 900, 3, 0x200000 }, /* PURE GUESS! */ + { "cgthree", 1152, 900, 3, 0x400000 }, /* data from rwolff */ 0 };