From 4e985a0854061cda383fc3a92f6e04aa5466ba9d Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Sun, 8 May 1994 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 1994-05-08 --- carrera/dat.h | 5 ----- carrera/main.c | 5 ----- pc/dat.h | 5 ----- pc/main.c | 5 ----- port/page.c | 1 - port/portdat.h | 9 --------- port/portfns.h | 2 -- port/proc.c | 28 ---------------------------- 8 files changed, 60 deletions(-) diff --git a/carrera/dat.h b/carrera/dat.h index 65c7b2b789a1febd52201778c2b91d77f2925d66..eb9be43835cdb535700ee3c6f3cfb607fdbb393f 100644 --- a/carrera/dat.h +++ b/carrera/dat.h @@ -113,11 +113,6 @@ struct Mach Schedq hiq; Schedq loq; - Callbk* cbin; - Callbk* cbout; - Callbk* cbend; - Callbk calls[NCALLBACK]; - int pfault; int cs; int syscall; diff --git a/carrera/main.c b/carrera/main.c index c757e7b6c3b5193b1c2895fdcba82aaa412e65e3..30d66df5acd4a959d0c6ee40495fb69fbc9b9683 100644 --- a/carrera/main.c +++ b/carrera/main.c @@ -155,11 +155,6 @@ machinit(void) active.exiting = 0; active.machs = 1; - - /* Setup call back ring buffer */ - m->cbin = m->calls; - m->cbout = m->calls; - m->cbend = &m->calls[NCALLBACK]; } /* diff --git a/pc/dat.h b/pc/dat.h index 00b2995eb2c6824057081fba92f992224a547940..00612a42be56e014a651d8d0c917e9a07f1eb3ee 100644 --- a/pc/dat.h +++ b/pc/dat.h @@ -128,11 +128,6 @@ struct Mach Schedq hiq; Schedq loq; - Callbk* cbin; - Callbk* cbout; - Callbk* cbend; - Callbk calls[NCALLBACK]; - int tlbfault; int tlbpurge; int pfault; diff --git a/pc/main.c b/pc/main.c index 0ae525f1ad596b5a569aef1602c38410300413d0..75911e70877df47371c2176241906f5ecd1d0bcb 100644 --- a/pc/main.c +++ b/pc/main.c @@ -91,11 +91,6 @@ machinit(void) memset(m, 0, sizeof(Mach)); m->machno = n; m->mmask = 1<machno; - - /* Setup call back ring buffer */ - m->cbin = m->calls; - m->cbout = m->calls; - m->cbend = &m->calls[NCALLBACK]; } void diff --git a/port/page.c b/port/page.c index c0d9536a149ee6daeb69030a2f8740fb534f809d..736576a1ffbc6ad41649ce10c6207287adf95066 100644 --- a/port/page.c +++ b/port/page.c @@ -118,7 +118,6 @@ retry: break; if(p == 0) { -print("! "); p = palloc.head; memset(p->cachectl, PG_NEWCOL, sizeof(p->cachectl)); p->color = color; diff --git a/port/portdat.h b/port/portdat.h index 91022961b52d859183dda81a7db8a4c6e7c8b64d..b3db649de27e0b26bb64829567f5cc75bea1dd71 100644 --- a/port/portdat.h +++ b/port/portdat.h @@ -599,15 +599,6 @@ struct Schedq int n; }; -#define NCALLBACK 32 - -typedef struct Callbk Callbk; -struct Callbk -{ - void (*func)(void*); - void* arg; -}; - enum { PRINTSIZE = 256, diff --git a/port/portfns.h b/port/portfns.h index 74137f88282f88c1384ae42f5be4e0b2cf4a065e..aa48bb362b46425505124c8caf96e1da5adadf83 100644 --- a/port/portfns.h +++ b/port/portfns.h @@ -15,8 +15,6 @@ Page* auxpage(void); void buzz(int, int); void cachedel(Image*, ulong); void cachepage(Page*, Image*); -void callbacks(void); -void newcallback(void (*)(void*), void*); int cangetc(void*); int canlock(Lock*); int canpage(Proc*); diff --git a/port/proc.c b/port/proc.c index edb205b8c01d13ab6e7f671d1bc7ed4ce7044e35..b7e215bdabff4d18f8ff46b8e51e968ed28d8748 100644 --- a/port/proc.c +++ b/port/proc.c @@ -87,7 +87,6 @@ sched(void) procsave(up); if(setlabel(&up->sched)) { procrestore(up); - callbacks(); spllo(); return; } @@ -107,33 +106,6 @@ anyready(void) return m->hiq.head != 0 || m->loq.head != 0; } -void -newcallback(void (*func)(void*), void *a) -{ - Callbk *c; - - c = m->cbin; - if(++m->cbin >= m->cbend) - m->cbin = m->calls; - - c->func = func; - c->arg = a; -} - -void -callbacks(void) -{ - Callbk *c; - - while(m->cbin != m->cbout) { - c = m->cbout; - if(++m->cbout >= m->cbend) - m->cbout = m->calls; - - c->func(c->arg); - } -} - void ready(Proc *p) {