~kris/9p

9hist

49234d55eedb0bffbfd4cea48eb79d98a7e59633 — David du Colombier 31 years ago a465f18
Plan 9 from Bell Labs 1995-08-12
4 files changed, 17 insertions(+), 15 deletions(-)

M pc/clock.c
M pc/devvga.c
M pc/vgaark2000pv.c
M port/devmouse.c
M pc/clock.c => pc/clock.c +1 -2
@@ 43,6 43,7 @@ clock(Ureg *ur, void *arg)
	checkalarms();
	hardclock();
	uartclock();
	mouseclock();

	if(up && up->state == Running){
		if(anyready())


@@ 52,8 53,6 @@ clock(Ureg *ur, void *arg)
		if((ur->cs&0xffff) == UESEL)
			(*(ulong*)(USTKTOP-BY2WD)) += TK2MS(1);
	}

	mouseclock();
}

#define STEPPING(x)	((x)&0xf)

M pc/devvga.c => pc/devvga.c +8 -8
@@ 734,7 734,7 @@ screenload(Rectangle r, uchar *data, int tl, int l, int dolock)

	if(dolock && hwgc == 0)
		cursorlock(r);
	lock(&palettelock);
	ilock(&palettelock);

	q = byteaddr(&gscreen, r.min);
	mx = 7>>gscreen.ldepth;


@@ 814,7 814,7 @@ screenload(Rectangle r, uchar *data, int tl, int l, int dolock)
		data += l;
	}

	unlock(&palettelock);
	iunlock(&palettelock);
	if(dolock && hwgc == 0)
		cursorunlock();
}


@@ 891,7 891,7 @@ screenunload(Rectangle r, uchar *data, int tl, int l, int dolock)

	if(dolock && hwgc == 0)
		cursorlock(r);
	lock(&palettelock);
	ilock(&palettelock);

	q = byteaddr(&gscreen, r.min);
	mx = 7>>gscreen.ldepth;


@@ 971,7 971,7 @@ screenunload(Rectangle r, uchar *data, int tl, int l, int dolock)
		data += l;
	}

	unlock(&palettelock);
	iunlock(&palettelock);
	if(dolock && hwgc == 0)
		cursorunlock();
}


@@ 1165,11 1165,11 @@ getcolor(ulong p, ulong *pr, ulong *pg, ulong *pb)
	}
	p &= x;
	p ^= x;
	lock(&palettelock);
	ilock(&palettelock);
	*pr = colormap[p][Pred];
	*pg = colormap[p][Pgreen];
	*pb = colormap[p][Pblue];
	unlock(&palettelock);
	iunlock(&palettelock);
}

int


@@ 1187,7 1187,7 @@ setcolor(ulong p, ulong r, ulong g, ulong b)
	}
	p &= x;
	p ^= x;
	lock(&palettelock);
	ilock(&palettelock);
	colormap[p][Pred] = r;
	colormap[p][Pgreen] = g;
	colormap[p][Pblue] = b;


@@ 1195,7 1195,7 @@ setcolor(ulong p, ulong r, ulong g, ulong b)
	vgao(Pdata, r>>(32-6));
	vgao(Pdata, g>>(32-6));
	vgao(Pdata, b>>(32-6));
	unlock(&palettelock);
	iunlock(&palettelock);
	return ~0;
}


M pc/vgaark2000pv.c => pc/vgaark2000pv.c +4 -4
@@ 154,16 154,16 @@ move(Point p)
	 */
	if((x = p.x+hotpoint.x) < 0){
		xo = -x;
		x = 0;
		x = 1;
	}
	else
		xo = 0;
		xo = 1;
	if((y = p.y+hotpoint.y) < 0){
		yo = -y;
		y = 0;
		y = 1;
	}
	else
		yo = 0;
		yo = 1;

	/*
	 * Load the new values.

M port/devmouse.c => port/devmouse.c +4 -1
@@ 212,7 212,10 @@ mouseread(Chan *c, void *va, long n, ulong offset)
	case Qmouse:
		while(mousechanged(0) == 0)
			sleep(&mouse.r, mousechanged, 0);
		lock(&cursor);

		while(!canlock(&cursor))
			tsleep(&up->sleep, return0, 0, TK2MS(1));

		sprint(buf, "m%11d %11d %11d %11d",
			mouse.xy.x, mouse.xy.y,
			mouseswap ? map[mouse.buttons&7] : mouse.buttons,