~kris/9p

9hist

a502208f213c67e6b355f35d4581523a3120b148 — David du Colombier 25 years ago b1f5829
Plan 9 from Bell Labs 2001-02-07
7 files changed, 25 insertions(+), 15 deletions(-)

M ip/udp.c
M pc/etherwavelan.c
M port/latin1.h
M port/portfns.h
M port/proc.c
M port/qio.c
M port/sysfile.c
M ip/udp.c => ip/udp.c +1 -1
@@ 120,7 120,7 @@ udpannounce(Conv *c, char** argv, int argc)
static void
udpcreate(Conv *c)
{
	c->rq = qopen(128*1024, 1, 0, 0);
	c->rq = qopen(256*1024, 1, 0, 0);
	c->wq = qopen(128*1024, 0, 0, 0);
}


M pc/etherwavelan.c => pc/etherwavelan.c +11 -6
@@ 256,6 256,8 @@ struct Stats
	ulong	ninfo;
	ulong	nidrop;
	ulong	nwatchdogs;		// transmit time outs, actually
	int	ticks;
	int	tickintr;
};

struct Ctlr


@@ 817,7 819,6 @@ w_timer(void* arg)
{
	Ether* ether = (Ether*) arg;
	Ctlr* ctlr = (Ctlr*)ether->ctlr;
	int tick=0;

	for(;;){
		tsleep(&ctlr->timer, return0, 0, 50);


@@ 826,7 827,7 @@ w_timer(void* arg)
			break;
		if (ctlr->attached == 0)
			continue;
		tick++;
		ctlr->ticks++;

		ilock(&ctlr->Lock);



@@ 845,10 846,12 @@ w_timer(void* arg)
		// the card frames in the wrong way; due to the
		// lack of documentation I cannot know.

		if (csr_ins(ctlr, WR_EvSts)&WEvs)
		if (csr_ins(ctlr, WR_EvSts)&WEvs){
			ctlr->tickintr++;
			w_intr(ether);
		}

		if (tick % 10 == 0) {
		if ((ctlr->ticks % 10) == 0) {
			if (ctlr->txtmout && --ctlr->txtmout == 0){
				ctlr->nwatchdogs++;
				w_txdone(ctlr, WTxErrEv|1); // 1: keep it busy


@@ 858,7 861,7 @@ w_timer(void* arg)
				if (ctlr->txbusy)
					w_txstart(ether,1);
			}
			if (tick % 120 == 0)
			if ((ctlr->ticks % 120) == 0)
			if (ctlr->txbusy == 0)
				w_cmd(ctlr, WCmdAskStats, WTyp_Stats);
		}


@@ 922,6 925,8 @@ ifstat(Ether* ether, void* a, long n, ulong offset)
	PRINTSTAT("InfoEvs: %lud\n", ctlr->ninfo);
	PRINTSTAT("InfoDrop: %lud\n", ctlr->nidrop);
	PRINTSTAT("WatchDogs: %lud\n", ctlr->nwatchdogs);
	PRINTSTAT("Ticks: %ud\n", ctlr->ticks);
	PRINTSTAT("TickIntr: %ud\n", ctlr->tickintr);
	k = ((ctlr->attached) ? "attached" : "not attached");
	PRINTSTAT("Card %s", k);
	k = ((ctlr->txbusy)? ", txbusy" : "");


@@ 1226,7 1231,7 @@ reset(Ether* ether)
	if(ctlr->hascrypt = ltv_ins(ctlr, WTyp_HasCrypt))
		ctlr->crypt = 1;
	*ctlr->netname = *ctlr->wantname = 0;
	strcpy(ctlr->nodename, "wvlancard");
	strcpy(ctlr->nodename, "Plan 9 STA");

	for(i = 0; i < ether->nopt; i++){
		//

M port/latin1.h => port/latin1.h +1 -1
@@ 74,7 74,7 @@
	"c", "$Oagu",	L"¢©∩≅∪",
	"dv", "z",	L"dž",
	"d", "-adegz",	L"ð↓‡°†ʣ",
	"e", "lmns",	L"⋯—–∅",
	"e", "$lmns",	L"€⋯—–∅",
	"f", "a",	L"∀",
	"g", "$-r",	L"¤ǥ∇",
	"h", "-v",	L"ℏƕ",

M port/portfns.h => port/portfns.h +1 -1
@@ 320,7 320,7 @@ long		userwrite(char*, int);
void		validaddr(ulong, ulong, int);
void		vcacheinval(Page*, ulong);
void*		vmemchr(void*, int, int);
int		wakeup(Rendez*);
Proc*		wakeup(Rendez*);
int		walk(Chan**, char*, int);
int		walkname(Chan**, char*, int);
void		wlock(RWlock*);

M port/proc.c => port/proc.c +4 -4
@@ 534,11 534,11 @@ tsleep(Rendez *r, int (*fn)(void*), void *arg, int ms)
 *  Richard Miller has a better solution that doesn't require both to
 *  be held simultaneously, but I'm a paranoid - presotto.
 */
int
Proc*
wakeup(Rendez *r)
{
	Proc *p;
	int s, rv;
	Proc *p, *rv;
	int s;

	rv = 0;
	s = splhi();


@@ 553,7 553,7 @@ wakeup(Rendez *r)
		r->p = nil;
		p->r = nil;
		ready(p);
		rv = 1;
		rv = p;
		unlock(&p->rlock);
	}


M port/qio.c => port/qio.c +6 -1
@@ 1028,6 1028,7 @@ long
qbwrite(Queue *q, Block *b)
{
	int n, dowakeup;
	Proc *p;

	dowakeup = 0;
	n = BLEN(b);


@@ 1080,7 1081,11 @@ qbwrite(Queue *q, Block *b)
	if(dowakeup){
		if(q->kick)
			q->kick(q->arg);
		wakeup(&q->rr);
		p = wakeup(&q->rr);

		/* if we just wokeup a higher priority process, let it run */
		if(p != nil && p->priority > up->priority)
			sched();
	}

	/*

M port/sysfile.c => port/sysfile.c +1 -1
@@ 584,7 584,7 @@ sysoseek(ulong *arg)
	} o;
	ulong a[5];

	o.v = arg[1];
	o.v = (long)arg[1];
	a[0] = (ulong)&o.v;
	a[1] = arg[0];
	a[2] = o.u[0];