From 852c8c9c6964df7c43de0f28a33e45f5fceec720 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Wed, 26 Jul 2000 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2000-07-26 --- alphapc/devarch.c | 4 ++-- alphapc/mem.h | 2 +- alphapc/screen.c | 1 + carrera/mem.h | 2 +- mpc/mem.h | 2 +- port/devloopback.c | 2 +- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/alphapc/devarch.c b/alphapc/devarch.c index 6e2db73eccee115b726eb582f62029d05eb9dbd2..09f1eb7a960ddd6363ed956881e7ad4d2cd28053 100644 --- a/alphapc/devarch.c +++ b/alphapc/devarch.c @@ -55,8 +55,8 @@ ioinit(void) iomap.maps[i].next = nil; iomap.free = iomap.maps; - // a dummy entry at 2^16 - ioalloc(0x10000, 1, 0, "dummy"); + // a dummy entry at 2^17 + ioalloc(0x20000, 1, 0, "dummy"); } static long cputyperead(char*, int, ulong); diff --git a/alphapc/mem.h b/alphapc/mem.h index 3dc137085252400b19aa7be62119083864167ac3..98ab31060b34f797fb42695641798debd346f55f 100644 --- a/alphapc/mem.h +++ b/alphapc/mem.h @@ -30,7 +30,7 @@ #define MS2HZ (1000/HZ) #define TK2SEC(t) ((t)/HZ) /* ticks to seconds */ #define TK2MS(t) ((t)*MS2HZ) /* ticks to milliseconds */ -#define MS2TK(t) ((t)/MS2HZ) /* milliseconds to ticks */ +#define MS2TK(t) (((t)*HZ+500)/1000) /* milliseconds to closest tick */ /* * Magic registers diff --git a/alphapc/screen.c b/alphapc/screen.c index be2bc5c4fad25d839a4c28407534c4415414b149..a4ffb07f3c7bfe1495d181940db454a291053fd3 100644 --- a/alphapc/screen.c +++ b/alphapc/screen.c @@ -469,6 +469,7 @@ int hwblank = 1; int hwdraw(Memdrawparam *par) { + int m; VGAscr *scr; Memimage *dst, *src; diff --git a/carrera/mem.h b/carrera/mem.h index ca9da356fcea5115e58dca3adb2885d77664c9a8..0c354d8aa9972955669c89cc29ddd02e217e355d 100644 --- a/carrera/mem.h +++ b/carrera/mem.h @@ -27,7 +27,7 @@ #define MS2HZ (1000/HZ) /* millisec per clock tick */ #define TK2SEC(t) ((t)/HZ) /* ticks to seconds */ #define TK2MS(t) ((t)*MS2HZ) /* ticks to milliseconds */ -#define MS2TK(t) ((t)/MS2HZ) /* milliseconds to ticks */ +#define MS2TK(t) (((t)*HZ+500)/1000) /* milliseconds to closest tick */ /* * CP0 registers diff --git a/mpc/mem.h b/mpc/mem.h index 83c00d6160495b148c2d8486286b51945843f44d..18998bed42de77d99202d2318f0dff895614917d 100644 --- a/mpc/mem.h +++ b/mpc/mem.h @@ -32,7 +32,7 @@ #define MS2HZ (1000/HZ) /* millisec per clock tick */ #define TK2SEC(t) ((t)/HZ) /* ticks to seconds */ #define TK2MS(t) ((t)*MS2HZ) /* ticks to milliseconds */ -#define MS2TK(t) ((t)/MS2HZ) /* milliseconds to ticks */ +#define MS2TK(t) (((t)*HZ+500)/1000) /* milliseconds to closest tick */ /* Bit encodings for Machine State Register (MSR) */ #define MSR_POW (1<<18) /* Enable Power Management */ diff --git a/port/devloopback.c b/port/devloopback.c index 5339c43410bdb5b144da66f4a403855d3b4df588..0e564a1584bc012fb81dcc557e2bbe953707ddf8 100644 --- a/port/devloopback.c +++ b/port/devloopback.c @@ -521,7 +521,7 @@ loopbackwrite(Chan *c, void *va, long n, vlong off) iunlock(link); }else if(strcmp(cb->f[0], "limit") == 0){ if(cb->nf != 2) - error("usage: droprate ofn"); + error("usage: limit maxqsize"); ilock(link); link->limit = strtol(cb->f[1], nil, 0); qsetlimit(link->oq, link->limit);