From 7378b287a0e9af2312ce4dc1b64fdb8321c2fef1 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Thu, 10 Sep 1992 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1992-09-10 --- port/page.c | 2 +- port/stfcall.c | 10 +++++++--- port/swap.c | 16 +++++++--------- ss/main.c | 2 ++ 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/port/page.c b/port/page.c index af326cbdebd105ff7e880bece5c61d6b256b4433..4c78a027c22261183378592f0a85654e8b5cde7c 100644 --- a/port/page.c +++ b/port/page.c @@ -94,7 +94,7 @@ retry: /* * If called from fault and we lost the segment from underneath * don't waste time allocating and freeing a page. Fault will call - * newpage again when it has reaquired the segment locks + * newpage again when it has reacquired the segment locks */ if(dontalloc) return 0; diff --git a/port/stfcall.c b/port/stfcall.c index 7cb60c03075e6a82ab24eb4bc187315b793c3fc8..54d3a24263b6995e16306c557f3cd78ef2a5784a 100644 --- a/port/stfcall.c +++ b/port/stfcall.c @@ -7,7 +7,7 @@ enum { - Twritehdr = 15, /* Min bytes for Twrite */ + Twritehdr = 16, /* Min bytes for Twrite */ Rreadhdr = 8, /* Min bytes for Rread */ Twritecnt = 13, /* Offset in byte stream of write count */ Rreadcnt = 5, /* Offset for Readcnt */ @@ -135,8 +135,12 @@ fcalliput(Queue *q, Block *bp) switch(bp->rptr[0]) { /* This is the type */ default: len = msglen[bp->rptr[0]]; - if(len == 0) - error(Emountrpc); + if(len == 0){ + bp = allocb(0); + bp->type = M_HANGUP; + PUTNEXT(q, bp); + return; + } if(q->len < len) return; diff --git a/port/swap.c b/port/swap.c index dee2f724507483488f127babeffa8f1c821bedc0..75fef4bc4c04999375859194797f24e0a22f9432 100644 --- a/port/swap.c +++ b/port/swap.c @@ -5,23 +5,22 @@ #include "fns.h" #include "../port/error.h" -/* Predeclaration */ +int canflush(Proc *p, Segment*); +void executeio(void); +int needpages(void*); void pageout(Proc *p, Segment*); void pagepte(int, Page**); -int needpages(void*); void pager(void*); -void executeio(void); -int canflush(Proc *p, Segment*); enum { Maxpages = 500, /* Max number of pageouts per segment pass */ }; -Image swapimage; -static int swopen; -Page *iolist[Maxpages]; -int ioptr; + Image swapimage; +static int swopen; +static Page *iolist[Maxpages]; +static int ioptr; void swapinit(void) @@ -161,7 +160,6 @@ pageout(Proc *p, Segment *s) if(s->steal) { /* Protected by /dev/proc */ qunlock(&s->lk); - putseg(s); return; } diff --git a/ss/main.c b/ss/main.c index 3fa28c09a87879b74eecb2be22a75cb71762516d..4b4624d9d10f5a3f06cdbac2d45b28c6f8dadd97 100644 --- a/ss/main.c +++ b/ss/main.c @@ -450,6 +450,8 @@ confinit(void) conf.frag = 32; if(cpuserver) conf.nproc = 500; + + conf.monitor = 0; } /*