~kris/9p

9hist

e5126b09222138c70d295478f8de10033ba933d3 — David du Colombier 32 years ago f8bb2b1
Plan 9 from Bell Labs 1993-10-11
3 files changed, 40 insertions(+), 9 deletions(-)

A port/cache.c
M port/devmnt.c
M port/swap.c
A port/cache.c => port/cache.c +31 -0
@@ 0,0 1,31 @@
#include	"u.h"
#include	"../port/lib.h"
#include	"mem.h"
#include	"dat.h"
#include	"fns.h"
#include	"../port/error.h"
#include	"devtab.h"

typedef struct Fcache Fcache;
typedef struct Fcalloc Fcalloc;
struct Fcache
{
	QLock;
	Qid;
	Page*	alloc;
	Fcache*	hash;
	Fcache*	next;
};

struct Fcalloc
{
	ulong	start;
	short	len;
	Page*	data;
};

Fcache*
clook(Qid *qid)
{

}

M port/devmnt.c => port/devmnt.c +4 -6
@@ 56,11 56,9 @@ Chan*	mntchan(void);

enum
{
	Tagspace = 1,
	Tagfls = 0x8000,
	Tagend = 0xfffe,

	ALIGN = 256,		/* Vme block mode alignment */
	Tagspace	= 1,
	Tagfls		= 0x8000,
	Tagend		= 0xfffe,
};

void


@@ 862,7 860,7 @@ mntchk(Chan *c)
		error(Eshutdown);

	/*
	 * Try and get the channel back
	 * Try and get the channel back after a crash
	 */
	if((c->flag&CRECOV) && m->recprog == 0)
		recoverchan(m, c);

M port/swap.c => port/swap.c +5 -3
@@ 94,9 94,10 @@ kickpager(void)
void
pager(void *junk)
{
	Proc *p, *ep;
	Segment *s;
	int i;
	Image *img;
	Segment *s;
	Proc *p, *ep;

	if(waserror()) 
		panic("pager: os error\n");


@@ 115,7 116,8 @@ loop:
			p = proctab(0);

		/* don't swap out programs from devroot.c */
		if(devchar[p->seg[SG_TEXT]->image->c->type] == '/')
		img = p->seg[SG_TEXT]->image;
		if(img && devchar[img->c->type] == '/')
			continue;

		if(p->state == Dead || p->kp)