~kris/9p

9hist

e82f7d11c308b94deef0b2e07073d75e9f058235 — David du Colombier 27 years ago 30cd6c9
Plan 9 from Bell Labs 1999-01-30
5 files changed, 10 insertions(+), 32 deletions(-)

M pc/archgeneric.c
M pc/clock.c
M pc/etherelnk3.c
M port/devcons.c
M port/portfns.h
M pc/archgeneric.c => pc/archgeneric.c +7 -1
@@ 205,7 205,7 @@ archinit(void)
		coherence = wbflush;
}

extern uvlong fasthz;
static uvlong fasthz;

void
cycletimerinit(void)


@@ 228,3 228,9 @@ cycletimer(uvlong *hz)
		*hz = fasthz;
	return tsc;
}

vlong
fastticks(uvlong *hz)
{
	return (*arch->fastclock)(hz);
}

M pc/clock.c => pc/clock.c +0 -29
@@ 17,11 17,6 @@ typedef struct Clock0link {
static Clock0link *clock0link;
static Lock clock0lock;

/* for fast clock */
static	vlong	fastoff;
static	vlong	fastsecs;
	uvlong	fasthz;

void
addclock0link(void (*clock)(void))
{


@@ 100,27 95,3 @@ microdelay(int microsecs)
		microsecs = 1;
	aamloop(microsecs);
}

vlong
fastticks(uvlong *hz)
{
	return (*arch->fastclock)(hz) + fastoff;
}

void
syncfastticks(vlong secs)
{
	vlong x, ofastoff;
	vlong err, deltat;

	/* set new offset */
	x = (*arch->fastclock)(nil);
	ofastoff = fastoff;
	fastoff = secs*fasthz - x;

	/* calculate first order diversion rate */
	err = fastoff - ofastoff;
	deltat = secs - fastsecs;
	fastsecs = secs;
	deltat *= fasthz;
}

M pc/etherelnk3.c => pc/etherelnk3.c +2 -0
@@ 30,6 30,7 @@
 *
 *	9000 PCI	3C900-TPO	Etherlink III XL PCI 10BASE-T
 *	9001 PCI	3C900-COMBO	Etherlink III XL PCI 10BASE-T/10BASE-2/AUI
 *	9005 PCI	3C900B-COMBO	Etherlink III XL PCI 10BASE-T/10BASE-2/AUI
 *	9050 PCI	3C905-TX	Fast Etherlink XL Shared 10BASE-T/100BASE-TX
 *	9051 PCI	3C905-T4	Fast Etherlink Shared 10BASE-T/100BASE-T4
 *	9055 PCI	3C905B-TX	Fast Etherlink Shared 10BASE-T/100BASE-TX


@@ 1685,6 1686,7 @@ etherelnk3reset(Ether* ether)

	case 0x9000:
	case 0x9001:
	case 0x9005:
	case 0x9050:
	case 0x9051:
	case 0x9055:

M port/devcons.c => port/devcons.c +1 -1
@@ 372,7 372,7 @@ static Dirtab consdir[]={
	"consctl",	{Qconsctl},	0,		0220,
	"cputime",	{Qcputime},	6*NUMSIZE,	0444,
	"drivers",	{Qdrivers},	0,		0644,
	"fastclock",	{Qfastclock},	4*NUMSIZE,	0444,
	"fastclock",	{Qfastclock},	4*NUMSIZE,	0664,
	"hostdomain",	{Qhostdomain},	DOMLEN,		0664,
	"hostowner",	{Qhostowner},	NAMELEN,	0664,
	"hz",		{Qhz},		NUMSIZE,	0666,

M port/portfns.h => port/portfns.h +0 -1
@@ 295,7 295,6 @@ void		srvrecover(Chan*, Chan*);
int		swapcount(ulong);
int		swapfull(void);
void		swapinit(void);
void		syncfastticks(vlong);
Block*		trimblock(Block*, int, int);
void		tsleep(Rendez*, int (*)(void*), void*, int);
void		unbreak(Proc*);