Plan 9 from Bell Labs’s /usr/web/sources/extra/9hist/gnot/dat.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


## diffname gnot/dat.h 1990/03091
## diff -e /dev/null /n/bootesdump/1990/03091/sys/src/9/68020/dat.h
0a
typedef struct Alarm	Alarm;
typedef struct Block	Block;
typedef struct Blist	Blist;
typedef struct Chan	Chan;
typedef struct Conf	Conf;
typedef struct Dev	Dev;
typedef struct Dir	Dir;
typedef struct Dirtab	Dirtab;
typedef struct Env	Env;
typedef struct Envp	Envp;
typedef struct Envval	Envval;
typedef struct Error	Error;
typedef struct FFrame	FFrame;
typedef struct FPsave	FPsave;
typedef struct Label	Label;
typedef struct List	List;
typedef struct Lock	Lock;
typedef struct Mach	Mach;
typedef struct Mount	Mount;
typedef struct Mtab	Mtab;
typedef struct Note	Note;
typedef struct Orig	Orig;
typedef struct PTE	PTE;
typedef struct Page	Page;
typedef struct Pgrp	Pgrp;
typedef struct Proc	Proc;
typedef struct Qinfo	Qinfo;
typedef struct QLock	QLock;
typedef struct Queue	Queue;
typedef struct Ref	Ref;
typedef struct Rendez	Rendez;
typedef struct Seg	Seg;
typedef struct Stream	Stream;
typedef struct Ureg	Ureg;
typedef struct User	User;

typedef int Devgen(Chan*, Dirtab*, int, int, Dir*);

struct List
{
	void	*next;
};

struct Lock
{
	char	key[1];			/* addr of sync bus semaphore */
	ulong	pc;
};

struct Ref
{
	Lock;
	int	ref;
};

struct QLock
{
	Proc	*head;			/* next process waiting for object */
	Proc	*tail;			/* last process waiting for object */
	Lock	use;			/* to use object */
	Lock	queue;			/* to access list */
};

struct Label
{
	ulong	sp;
	ulong	pc;
	ushort	sr;
};

struct Alarm
{
	List;
	Lock;
	int	busy;
	long	dt;		/* may underflow in clock(); must be signed */
	void	(*f)(void*);
	void	*arg;
};

#define	CHDIR	0x80000000L
#define	QPATH	0x0000FFFFL
struct Chan
{
	QLock;				/* general access */
	Ref;
	union{
		Chan	*next;		/* allocation */
		ulong	offset;		/* in file */
	};
	ushort	type;
	ushort	dev;
	ushort	mode;			/* read/write */
	ushort	flag;
	ulong	qid;
	Mount	*mnt;			/* mount point that derived Chan */
	ulong	mountid;
	int	fid;			/* for devmnt */
	Stream	*stream;		/* for stream channels */
	Chan	*mchan;			/* channel to mounted server */
	ulong	mqid;			/* qid of root of mount point */
};

struct	FPsave
{
	long	fpreg[32];
	long	fpstatus;
};

struct Conf
{
	int	nmach;		/* processors */
	int	nproc;		/* processes */
	int	npgrp;		/* process groups */
	ulong	npage;		/* total physical pages of memory */
	ulong	norig;		/* origins */
	ulong	npte;		/* contiguous page table entries */
	ulong	nmod;		/* single (modifying) page table entries */
	int	nalarm;		/* alarms */
	int	nchan;		/* channels */
	int	nenv;		/* distinct environment values */
	int	nenvchar;	/* environment text storage */
	int	npgenv;		/* environment files per process group */
	int	nmtab;		/* mounted-upon channels per process group */
	int	nmount;		/* mounts */
	int	nmntdev;	/* mounted devices (devmnt.c) */
	int	nmntbuf;	/* buffers for devmnt.c messages */
	int	nmnthdr;	/* headers for devmnt.c messages */
	int	nstream;	/* streams */
	int	nqueue;		/* stream queues */
	int	nblock;		/* stream blocks */
	int	nsrv;		/* public servers (devsrv.c) */
};

struct Dev
{
	void	 (*reset)(void);
	void	 (*init)(void);
	Chan	*(*attach)(char*);
	Chan	*(*clone)(Chan*, Chan*);
	int	 (*walk)(Chan*, char*);
	void	 (*stat)(Chan*, char*);
	Chan	*(*open)(Chan*, int);
	void	 (*create)(Chan*, char*, int, ulong);
	void	 (*close)(Chan*);
	long	 (*read)(Chan*, void*, long);
	long	 (*write)(Chan*, void*, long);
	void	 (*remove)(Chan*);
	void	 (*wstat)(Chan*, char*);
	void	 (*errstr)(Error*, char*);
	void	 (*userstr)(Error*, char*);
};

struct Dirtab
{
	char	name[NAMELEN];
	long	qid;
	long	length;
	long	perm;
};

struct Env
{
	Lock;
	Envval	*val;
	char	name[NAMELEN];
	Env	*next;			/* in chain of Envs for a pgrp */
	int	pgref;			/* # pgrps pointing here */
};

struct Envp
{
	Env	*env;
	int	chref;			/* # chans from pgrp pointing here */
};

struct Mach
{
	int	machno;			/* physical id of processor */
	int	mmask;			/* 1<<m->machno */
	ulong	ticks;			/* of the clock since boot time */
	Proc	*proc;			/* current process on this processor */
	Label	sched;			/* scheduler wakeup */
	Lock	alarmlock;		/* access to alarm list */
	void	*alarm;			/* alarms bound to this clock */
	int	stack[1];
};

struct Mount
{
	Ref;				/* also used as a lock when playing lists */
	short	term;			/* terminates list */
	ulong	mountid;
	Mount	*next;
	Chan	*c;			/* channel replacing underlying channel */
};

struct Mtab
{
	Chan	*c;			/* channel mounted upon */
	Mount	*mnt;			/* what's mounted upon it */
};

enum{
	NUser,				/* note provided externally */
	NExit,				/* process should exit */
	NDebug,				/* process should hang */
};

struct Note
{
	char	msg[ERRLEN];
	int	flag;			/* whether system posted it */
};

struct Orig
{
	Lock;
	Orig	*next;			/* for allocation */
	ushort	nproc;			/* processes using it */
	ushort	npage;			/* sum of refs of pages in it */
	ushort	flag;
	ulong	va;			/* va of 0th pte */
	ulong	npte;			/* #pte's in list */
	PTE	*pte;
	Chan	*chan;			/* channel deriving segment (if open) */
	ushort	type;			/* of channel (which could be non-open) */
	ulong	qid;
	Chan	*mchan;
	ulong	mqid;
	ulong	minca;			/* base of region in chan */
	ulong	maxca;			/* end of region in chan */
};

struct Page
{
	Orig	*o;			/* origin of segment owning page */
	ulong	va;			/* virtual address */
	ulong	pa;			/* physical address */
	ushort	ref;
	Page	*next;
	Page	*prev;
};

struct Pgrp
{
	Ref;				/* also used as a lock when mounting */
	Pgrp	*next;
	ulong	pgrpid;
	char	user[NAMELEN];
	int	nmtab;			/* highest active mount table entry, +1 */
	int	nenv;			/* highest active env table entry, +1 */
	Mtab	*mtab;
	Envp	*etab;
};

struct PTE
{
	Proc	*proc;			/* process owning this PTE (0 in Orig) */
	PTE	*nextmod;		/* next at this va */
	PTE	*nextva;		/* next in this proc at higher va */
	Page	*page;
};

struct Rendez
{
	Lock;
	Proc	*p;
};

struct Seg
{
	Proc	*proc;			/* process owning this segment */
	Orig	*o;			/* root list of pte's */
	ulong	minva;			/* va of 0th pte (not necessarily Seg->o->va) */
	ulong	maxva;			/* va of last pte */
	PTE	*mod;			/* list of modified pte's */
	ulong	pad[3]; /**/
};

struct Proc
{
	Label	sched;
	Lock;
	Mach	*mach;			/* machine running this proc */
	char	text[NAMELEN];
	Proc	*rnext;			/* next process in run queue */
	Proc	*qnext;			/* next process on queue for a QLock */
	int	state;
	short	pidonmach[MAXMACH];	/* TLB pid on each mmu */
	Page	*upage;			/* BUG: should be unlinked from page list */
	Seg	seg[NSEG];
	ulong	pid;
	Lock	kidlock;		/* access to kid and sib */
	Proc	*pop;			/* some ascendant */
	Proc	*kid;			/* some descendant */
	Proc	*sib;			/* non-ascendant relatives (circular list) */
	int	nchild;
	QLock	wait;			/* exiting children to be waited for */
	Waitmsg	*waitmsg;
	Proc	*child;
	Proc	*parent;
	Pgrp	*pgrp;
	ulong	parentpid;
	ulong	time[6];		/* User, Sys, Real; child U, S, R */
	short	exiting;
	short	insyscall;
	int	fpstate;
	Lock	debug;			/* to access debugging elements of User */
	Rendez	*r;			/* rendezvous point slept on */
	Rendez	sleep;			/* place for tsleep and syssleep */
	int	wokeup;			/* whether sleep was interrupted */
	ulong	pc;			/* DEBUG only */
};

#define	NERR	10
#define	NNOTE	5
#define	NFD	100
struct User
{
	Proc	*p;
	Label	errlab[NERR];
	int	nerrlab;
	Error	error;
	FPsave	fpsave;			/* address of this is known by vdb */
	char	elem[NAMELEN];		/* last name element from namec */
	Chan	*slash;
	Chan	*dot;
	Chan	*fd[NFD];
	int	maxfd;			/* highest fd in use */
	/*
	 * Rest of structure controlled by devproc.c and friends.
	 * lock(&p->debug) to modify.
	 */
	Note	note[NNOTE];
	short	nnote;
	short	notified;		/* sysnoted is due */
	int	(*notify)(void*, char*);
	void	*ureg;
};

/*
 *  operations available to a queue
 */
struct Qinfo
{
	void (*iput)(Queue*, Block*);	/* input routine */
	void (*oput)(Queue*, Block*);	/* output routine */
	void (*open)(Queue*, Stream*);
	void (*close)(Queue*);
	char *name;
};

/*
 *  We reference lance buffers via descriptors kept in host memory
 */
struct Block
{
	Block	*next;
	uchar	*rptr;		/* first unconsumed byte */
	uchar	*wptr;		/* first empty byte */
	uchar	*lim;		/* 1 past the end of the buffer */
	uchar	*base;		/* start of the buffer */
	uchar	flags;
	uchar	type;
};

/* flag bits */
#define S_DELIM 0x80
#define S_CLASS 0x07

/* type values */
#define M_DATA 0
#define M_CTL 1
#define M_HANGUP 2

/*
 *  a list of blocks
 */
struct Blist {
	Lock;
	Block	*first;		/* first data block */
	Block	*last;		/* last data block */
	long	len;		/* length of list in bytes */
};

/*
 *  a queue of blocks
 */
struct Queue {
	Blist;
	int	flag;
	Qinfo	*info;		/* line discipline definition */
	Queue	*other;		/* opposite direction, same line discipline */
	Queue	*next;		/* next queue in the stream */
	void	(*put)(Queue*, Block*);
	Rendez	r;
	void	*ptr;		/* private info for the queue */
};
#define QHUNGUP	0x1	/* flag bit meaning the stream has been hung up */
#define QINUSE	0x2
#define QHIWAT	0x4	/* queue has gone past the high water mark */	

/*
 *  a stream head
 */
struct Stream {
	Lock;			/* structure lock */
	int	inuse;		/* use count */
	int	type;		/* correclation with Chan */
	int	dev;		/* ... */
	int	id;		/* ... */
	QLock	rdlock;		/* read lock */
	QLock	wrlock;		/* write lock */
	Queue	*procq;		/* write queue at process end */
	Queue	*devq;		/* read queue at device end */
	char	tag[32];	/* when reading the tag qid */
};
#define	RD(q)		((q)->other < (q) ? (q->other) : q)
#define	WR(q)		((q)->other > (q) ? (q->other) : q)
#define GLOBAL(a)	(((ulong)(a)) & 0x80000000)
#define STREAMTYPE(x)	((x)&0x1f)
#define STREAMID(x)	(((x)&~CHDIR)>>5)
#define STREAMQID(i,t)	(((i)<<5)|(t))
#define PUTNEXT(q,b)	(*(q)->next->put)((q)->next, bp)

/*
 *  stream file qid's & high water mark
 */
enum {
	Shighqid = STREAMQID(1,0) - 1,
	Sdataqid = Shighqid,
	Sctlqid = Sdataqid-1,
	Slowqid = Sctlqid,
	Streamhi= (32*1024),	/* stream high water mark */
};

#define	PRINTSIZE	256

extern Mach	*m;
extern User	*u;

/*
 * Process states
 */
enum
{
	Dead = 0,
	Moribund,
	Zombie,
	Ready,
	Scheding,
	Running,
	Queueing,
	MMUing,
	Exiting,
	Inwait,
	Wakeme,
	Broken,
};
extern	char	*statename[];

/*
 * Chan flags
 */
#define	COPEN	1	/* for i/o */
#define	CMOUNT	2	/* is result of a mount/bind */
#define	CCREATE	4	/* permits creation if CMOUNT */

/*
 * Proc.time
 */
enum
{
	TUser,
	TSys,
	TReal,
	TCUser,
	TCSys,
	TCReal,
};

/*
 * floating point registers
 */
enum
{
	FPinit,
	FPactive,
	FPinactive,
};

/*
 * Memory management
 */
#define	SSEG	0
#define	TSEG	1
#define	DSEG	2
#define	BSEG	3
#define	ESEG	4	/* used by exec to build new stack */

#define	OWRPERM	0x01	/* write permission */
#define	OPURE	0x02	/* original data mustn't be written */
#define	OCACHED	0x04	/* cached; don't discard on exit */

/*
 * Access types in namec
 */
enum
{
	Aaccess,	/* as in access, stat */
	Atodir,		/* as in chdir */
	Aopen,		/* for i/o */
	Amount,		/* to be mounted upon */
	Acreate,	/* file is to be created */
};

#define	NUMSIZE	12		/* size of formatted number */

#define	MACHP(n)	(n==0? &mach0 : *(Mach**)0)

extern	Conf	conf;
extern	ulong	initcode[];
extern	Dev	devtab[];
extern	char	devchar[];
extern	FPsave	initfp;
extern	Mach	mach0;
.
## diffname gnot/dat.h 1990/0312
## diff -e /n/bootesdump/1990/03091/sys/src/9/68020/dat.h /n/bootesdump/1990/0312/sys/src/9/68020/dat.h
425c
#define PUTNEXT(q,b)	(*(q)->next->put)((q)->next, b)
#define BLEN(b)		((b)->wptr - (b)->rptr)
.
284d
## diffname gnot/dat.h 1990/0320
## diff -e /n/bootesdump/1990/0312/sys/src/9/68020/dat.h /n/bootesdump/1990/0320/sys/src/9/68020/dat.h
435c
	Streamhi= (8*1024),	/* stream high water mark */
.
## diffname gnot/dat.h 1990/0327
## diff -e /n/bootesdump/1990/0320/sys/src/9/68020/dat.h /n/bootesdump/1990/0327/sys/src/9/68020/dat.h
132a
	int	nbitmap;	/* bitmap structs (devbit.c) */
	int	nbitbyte;	/* bytes of bitmap data (devbit.c) */
.
## diffname gnot/dat.h 1990/0331
## diff -e /n/bootesdump/1990/0327/sys/src/9/68020/dat.h /n/bootesdump/1990/0331/sys/src/9/68020/dat.h
410a
	int	hread;		/* number of reads after hangup */
.
## diffname gnot/dat.h 1990/0403
## diff -e /n/bootesdump/1990/0331/sys/src/9/68020/dat.h /n/bootesdump/1990/0403/sys/src/9/68020/dat.h
438c
	Streamhi= (9*1024),	/* byte count high water mark */
	Streambhi= 16,		/* block count high water mark */
.
428a
#define QFULL(q)	((q)->flag & QHIWAT)
#define FLOWCTL(q)	{ if(QFULL(q)) flowctl(q); }
.
392a
	int	nb;		/* number of blocks in queue */
.
46c
	char	key;			/* addr of sync bus semaphore */
.
## diffname gnot/dat.h 1990/0406
## diff -e /n/bootesdump/1990/0403/sys/src/9/68020/dat.h /n/bootesdump/1990/0406/sys/src/9/68020/dat.h
431c
#define FLOWCTL(q)	{ if(QFULL(q->next)) flowctl(q); }
.
393d
385a
	int	nb;		/* number of blocks in list */
.
## diffname gnot/dat.h 1990/05313
## diff -e /n/bootesdump/1990/0406/sys/src/9/68020/dat.h /n/bootesdump/1990/05313/sys/src/9/68020/dat.h
324a
	Label	errlab[NERR];
.
323d
291d
289a
	QLock	*qlock;			/* address of qlock being queued for DEBUG */
.
## diffname gnot/dat.h 1990/06021
## diff -e /n/bootesdump/1990/05313/sys/src/9/68020/dat.h /n/bootesdump/1990/06021/sys/src/9/68020/dat.h
301c
	ulong	waitmsg;
.
178a
struct KMap
{
	KMap	*next;
	ulong	pa;
	ulong	va;
};

.
114a
	ulong	npage0;		/* total physical pages of memory, bank 0 */
	ulong	npage1;		/* total physical pages of memory, bank 1 */
	ulong	base0;		/* base of bank 0 */
	ulong	base1;		/* base of bank 1 */
.
14a
typedef struct KMap	KMap;
.
## diffname gnot/dat.h 1990/0614
## diff -e /n/bootesdump/1990/06021/sys/src/9/68020/dat.h /n/bootesdump/1990/0614/sys/src/9/68020/dat.h
189a
#define	VA(k)	((k)->va)
.
## diffname gnot/dat.h 1990/0620
## diff -e /n/bootesdump/1990/0614/sys/src/9/68020/dat.h /n/bootesdump/1990/0620/sys/src/9/68020/dat.h
433d
424c
	int	inuse;		/* number of processes in stream */
	int	opens;		/* number of processes with stream open */
.
## diffname gnot/dat.h 1990/0621
## diff -e /n/bootesdump/1990/0620/sys/src/9/68020/dat.h /n/bootesdump/1990/0621/sys/src/9/68020/dat.h
330c
#define	NERR	15
.
## diffname gnot/dat.h 1990/0623
## diff -e /n/bootesdump/1990/0621/sys/src/9/68020/dat.h /n/bootesdump/1990/0623/sys/src/9/68020/dat.h
139a
	int	nfont;		/* font structs (devbit.c) */
.
## diffname gnot/dat.h 1990/0717
## diff -e /n/bootesdump/1990/0623/sys/src/9/68020/dat.h /n/bootesdump/1990/0717/sys/src/9/68020/dat.h
140a
	int	nurp;		/* max urp conversations */
.
## diffname gnot/dat.h 1990/0720
## diff -e /n/bootesdump/1990/0717/sys/src/9/68020/dat.h /n/bootesdump/1990/0720/sys/src/9/68020/dat.h
457c
	Streambhi= 32,		/* block count high water mark */
.
## diffname gnot/dat.h 1990/0721
## diff -e /n/bootesdump/1990/0720/sys/src/9/68020/dat.h /n/bootesdump/1990/0721/sys/src/9/68020/dat.h
419a
#define QDEBUG	0x8
.
## diffname gnot/dat.h 1990/08101
## diff -e /n/bootesdump/1990/0721/sys/src/9/68020/dat.h /n/bootesdump/1990/08101/sys/src/9/68020/dat.h
82a
#define	CHAPPEND 0x40000000L
#define	CHEXCL	0x20000000L
.
## diffname gnot/dat.h 1990/08141
## diff -e /n/bootesdump/1990/08101/sys/src/9/68020/dat.h /n/bootesdump/1990/08141/sys/src/9/68020/dat.h
493a
#define	CCEXEC	8	/* close on exec */
.
## diffname gnot/dat.h 1990/08163
## diff -e /n/bootesdump/1990/08141/sys/src/9/68020/dat.h /n/bootesdump/1990/08163/sys/src/9/68020/dat.h
516c
	FPdirty,
.
204a
	int	fpstate;		/* state of fp registers on machine */
.
109,110c
	char	type;
	char	size;
	short	reserved;
	char	junk[180];
	char	reg[3*4+8*12];
.
## diffname gnot/dat.h 1990/0905
## diff -e /n/bootesdump/1990/08163/sys/src/9/68020/dat.h /n/bootesdump/1990/0905/sys/src/9/68020/dat.h
112c
	char	junk[212];	/* 68881: sizes 24, 180; 68882: 56, 212 */
.
109,110c
	uchar	type;
	uchar	size;
.
## diffname gnot/dat.h 1990/0911
## diff -e /n/bootesdump/1990/0905/sys/src/9/68020/dat.h /n/bootesdump/1990/0911/sys/src/9/68020/dat.h
373a
	void (*reset)(void);		/* initialization */
	Qinfo *next;
.
146a
	int	nasync;		/* number of async protocol modules */
.
## diffname gnot/dat.h 1990/0914
## diff -e /n/bootesdump/1990/0911/sys/src/9/68020/dat.h /n/bootesdump/1990/0914/sys/src/9/68020/dat.h
501a
#define	CFREE	16	/* not in use */
.
## diffname gnot/dat.h 1990/0918
## diff -e /n/bootesdump/1990/0914/sys/src/9/68020/dat.h /n/bootesdump/1990/0918/sys/src/9/68020/dat.h
315a
	ulong	bssend;			/* initial top of bss seg */
.
## diffname gnot/dat.h 1990/0921
## diff -e /n/bootesdump/1990/0918/sys/src/9/68020/dat.h /n/bootesdump/1990/0921/sys/src/9/68020/dat.h
362a
	MMUCache mc;
.
339a
struct MMU
{
	ulong	va;
	ulong	pa;
	int	pid;
};

#define NMMU 16
struct MMUCache
{
	ulong	next;
	MMU	mmu[NMMU];
};

.
18a
typedef struct MMU	MMU;
typedef struct MMUCache	MMUCache;
.
## diffname gnot/dat.h 1990/0928
## diff -e /n/bootesdump/1990/0921/sys/src/9/68020/dat.h /n/bootesdump/1990/0928/sys/src/9/68020/dat.h
379d
342,355d
## diffname gnot/dat.h 1990/1002
## diff -e /n/bootesdump/1990/0928/sys/src/9/68020/dat.h /n/bootesdump/1990/1002/sys/src/9/68020/dat.h
104c
	union{
		Stream	*stream;	/* for stream channels */
		void	*aux;
	};
.
## diffname gnot/dat.h 1990/1004
## diff -e /n/bootesdump/1990/1002/sys/src/9/68020/dat.h /n/bootesdump/1990/1004/sys/src/9/68020/dat.h
567a

extern  void	(*kprofp)(ulong);
.
367a
	MMUCache mc;
.
344a
struct MMU
{
	ulong	va;
	ulong	pa;
};

#define NMMU 16
struct MMUCache
{
	ulong	next;
	MMU	mmu[NMMU];
};

.
342a
	int	kp;			/* true if a kernel process */
.
318a
	int	spin;			/* spinning instead of unscheduled */
.
210a
	Proc	*lproc;			/* last process on this processor */
.
207a
	ulong	splpc;			/* pc of last caller to splhi */
.
104c
	union {
.
## diffname gnot/dat.h 1990/1009
## diff -e /n/bootesdump/1990/1004/sys/src/9/68020/dat.h /n/bootesdump/1990/1009/sys/src/9/68020/dat.h
467d
460,465c
	short	inuse;		/* number of processes in stream */
	short	opens;		/* number of processes with stream open */
	ushort	hread;		/* number of reads after hangup */
	ushort	type;		/* correlation with Chan */
	ushort	dev;		/* ... */
	ushort	id;		/* ... */
.
152a
	int	npipe;		/* number of pipes */
.
## diffname gnot/dat.h 1990/1018
## diff -e /n/bootesdump/1990/1009/sys/src/9/68020/dat.h /n/bootesdump/1990/1018/sys/src/9/68020/dat.h
447a
	QLock	rlock;		/* mutex for processes sleeping at r */
.
178c
	ulong	qid;
.
12d
7d
## diffname gnot/dat.h 1990/1104
## diff -e /n/bootesdump/1990/1018/sys/src/9/68020/dat.h /n/bootesdump/1990/1104/sys/src/9/68020/dat.h
491a

#define NSTUB 32
struct Service
{
	Ref;
	Service *next;
	QLock	alock;
	int	die;
	Chan	*c;
	char	name[NAMELEN];
};

.
151a
	int	nservice;	/* number of services */
.
33a
typedef struct Service	Service;
.
## diffname gnot/dat.h 1990/1106
## diff -e /n/bootesdump/1990/1104/sys/src/9/68020/dat.h /n/bootesdump/1990/1106/sys/src/9/68020/dat.h
502c
	Chan	*inc;
	Chan	*outc;
.
284a
	Lock	debug;			/* single access via devproc.c */
.
280a
	int	index;			/* index in pgrp table */
.
105a
		ulong	pgrpid;		/* for #p/notepg */
.
## diffname gnot/dat.h 1990/1110
## diff -e /n/bootesdump/1990/1106/sys/src/9/68020/dat.h /n/bootesdump/1990/1110/sys/src/9/68020/dat.h
154a
	int	nfsyschan;	/* number of filsys open channels */
.
## diffname gnot/dat.h 1990/11151
## diff -e /n/bootesdump/1990/1110/sys/src/9/68020/dat.h /n/bootesdump/1990/11151/sys/src/9/68020/dat.h
465c
	QLock;			/* structure lock */
.
## diffname gnot/dat.h 1990/11211
## diff -e /n/bootesdump/1990/11151/sys/src/9/68020/dat.h /n/bootesdump/1990/11211/sys/src/9/68020/dat.h
603a
extern	char	user[NAMELEN];
extern	char	*errstrtab[];
.
375c
	char	error[ERRLEN];
.
264c
	Qid	mqid;
.
262c
	Qid	qid;
.
180c
	Qid	qid;
.
173,174d
109c
	Qid	mqid;			/* qid of root of mount point */
.
106c
		Qid	pgrpid;		/* for #p/notepg */
.
99c
	Qid	qid;
.
## diffname gnot/dat.h 1990/1122
## diff -e /n/bootesdump/1990/11211/sys/src/9/68020/dat.h /n/bootesdump/1990/1122/sys/src/9/68020/dat.h
86d
## diffname gnot/dat.h 1990/1124
## diff -e /n/bootesdump/1990/1122/sys/src/9/68020/dat.h /n/bootesdump/1990/1124/sys/src/9/68020/dat.h
364c
#define	NERR	20
.
328,331d
## diffname gnot/dat.h 1990/1127
## diff -e /n/bootesdump/1990/1124/sys/src/9/68020/dat.h /n/bootesdump/1990/1127/sys/src/9/68020/dat.h
360c
#define	NERR	15
.
## diffname gnot/dat.h 1990/1211
## diff -e /n/bootesdump/1990/1127/sys/src/9/68020/dat.h /n/bootesdump/1990/1211/sys/src/9/68020/dat.h
600a

/*
 *  parameters for sysproc.c
 */
#define AOUT_MAGIC	A_MAGIC
#define ENTRYOFFSET	0
.
344a
	int	pidonmach[1];		/* !!Compatability with mips!! */
.
216a
	void	(*intr)(ulong, ulong);	/* !!Compatability with mips!! */
	ulong	cause;			/*	... */
	ulong	pc;			/*	... */
.
154a
	ulong	maxialloc;	/* maximum bytes used by ialloc */
.
## diffname gnot/dat.h 1990/1212
## diff -e /n/bootesdump/1990/1211/sys/src/9/68020/dat.h /n/bootesdump/1990/1212/sys/src/9/68020/dat.h
451c
	Rendez	r;		/* standard place to wait for flow control */
	Rendez	*rp;		/* where flow control wakeups go to */
.
155a
	int	copymode;	/* 0 is copy on write, 1 is copy on reference */
.
## diffname gnot/dat.h 1990/1226
## diff -e /n/bootesdump/1990/1212/sys/src/9/68020/dat.h /n/bootesdump/1990/1226/sys/src/9/68020/dat.h
613d
48c
	char	key;
.
## diffname gnot/dat.h 1991/0109
## diff -e /n/bootesdump/1990/1226/sys/src/9/68020/dat.h /n/bootesdump/1991/0109/sys/src/9/68020/dat.h
335c
	Waitmsg	waitmsg;		/* this is large but must be addressable */
.
## diffname gnot/dat.h 1991/0110
## diff -e /n/bootesdump/1991/0109/sys/src/9/68020/dat.h /n/bootesdump/1991/0110/sys/src/9/68020/dat.h
156a
	int	portispaged;	/* ??? */
.
## diffname gnot/dat.h 1991/0115
## diff -e /n/bootesdump/1991/0110/sys/src/9/68020/dat.h /n/bootesdump/1991/0115/sys/src/9/68020/dat.h
613a

/*
 *  for SCSI bus
 */
struct Scsidata
{
	uchar *	base;
	uchar *	lim;
	uchar *	ptr;
};

struct Scsi
{
	QLock;
	ushort	target, lun;
	ushort	state;
	ushort	status;
	Scsidata cmd;
	Scsidata data;
	uchar *	save;
	uchar	cmdblk[16];
};

struct Portpage
{
	union {
		Lock;
		QLock;
	};
	int	 select;
};

#define PORTSIZE	64
#define PORTSHIFT	6
#define PORTSELECT	PORT[32]

extern Portpage portpage;
extern int	portispaged;
extern int	(*portservice[])(void);
.
512d
32a
typedef struct Scsi	Scsi;
typedef struct Scsidata	Scsidata;
.
25a
typedef struct Portpage	Portpage;
.
## diffname gnot/dat.h 1991/0209
## diff -e /n/bootesdump/1991/0201/sys/src/9/68020/dat.h /n/bootesdump/1991/0209/sys/src/9/gnot/dat.h
223,225d
## diffname gnot/dat.h 1991/0212
## diff -e /n/bootesdump/1991/0209/sys/src/9/gnot/dat.h /n/bootesdump/1991/0212/sys/src/9/gnot/dat.h
291c
	QLock	debug;			/* single access via devproc.c */
.
## diffname gnot/dat.h 1991/0411
## diff -e /n/bootesdump/1991/0212/sys/src/9/gnot/dat.h /n/bootesdump/1991/0411/sys/src/9/gnot/dat.h
475a
	Block	*err;		/* error message from down stream */
.
174,175c
	long	 (*read)(Chan*, void*, long, ulong);
	long	 (*write)(Chan*, void*, long, ulong);
.
91c
	QLock	rdl;			/* read access */
	QLock	wrl;			/* write access */
.
## diffname gnot/dat.h 1991/0419
## diff -e /n/bootesdump/1991/0411/sys/src/9/gnot/dat.h /n/bootesdump/1991/0419/sys/src/9/gnot/dat.h
178a
	Chan	*(*clwalk)(Chan*, char*);
.
## diffname gnot/dat.h 1991/0421
## diff -e /n/bootesdump/1991/0419/sys/src/9/gnot/dat.h /n/bootesdump/1991/0421/sys/src/9/gnot/dat.h
109a
		int	mntindex;	/* for devmnt */
.
## diffname gnot/dat.h 1991/0423
## diff -e /n/bootesdump/1991/0421/sys/src/9/gnot/dat.h /n/bootesdump/1991/0423/sys/src/9/gnot/dat.h
632c
	ushort	rflag;
.
630a
	ulong	pid;
.
## diffname gnot/dat.h 1991/0425
## diff -e /n/bootesdump/1991/0423/sys/src/9/gnot/dat.h /n/bootesdump/1991/0425/sys/src/9/gnot/dat.h
225a

	int	tlbfault;
	int	pfault;
	int	cs;
	int	syscall;
	int	spinlock;
	int	intr;

.
## diffname gnot/dat.h 1991/0427
## diff -e /n/bootesdump/1991/0425/sys/src/9/gnot/dat.h /n/bootesdump/1991/0427/sys/src/9/gnot/dat.h
180d
## diffname gnot/dat.h 1991/0428
## diff -e /n/bootesdump/1991/0427/sys/src/9/gnot/dat.h /n/bootesdump/1991/0428/sys/src/9/gnot/dat.h
527,663d
404,524d
401a
	/*
	 *  machine dependent User stuff
	 */
	MMUCache mc;
.
400d
364,376d
344,361c
	ushort	target, lun;
	ushort	rflag;
	ushort	status;
	Scsidata cmd;
	Scsidata data;
	uchar *	save;
	uchar	cmdblk[16];
.
265,342c
	QLock;
.
263c
struct Scsi
.
259,260c
	uchar *	base;
	uchar *	lim;
	uchar *	ptr;
.
257c
/*
 *  for SCSI bus
 */
struct Scsidata
.
251,255c
extern Portpage portpage;
extern int	portispaged;
extern int	(*portservice[])(void);
.
247,248c
	union {
		Lock;
		QLock;
	};
	int	 select;
.
245c
struct Portpage
.
236,243c
/*
 *  gnot bus ports
 */
#define PORTSIZE	64
#define PORTSHIFT	6
#define PORTSELECT	PORT[32]
.
217d
182,204c
/*
 *  machine dependent definitions not used by ../port/dat.h
 */
.
165,180c
#include "../port/portdat.h"
.
116,124d
91,113c
	ulong	next;
	MMU	mmu[NMMU];
.
86,89c
#define NMMU 16
struct MMUCache
.
78,83c
	ulong	va;
	ulong	pa;
.
76c
struct MMU
.
63,66c
	uchar	type;
	uchar	size;
	short	reserved;
	char	junk[212];	/* 68881: sizes 24, 180; 68882: 56, 212 */
	char	reg[3*4+8*12];
.
61c
struct	FPsave
.
57,58c
	FPinit,
	FPactive,
	FPdirty,
.
55c
enum
.
48a
/*
 *  parameters for sysproc.c
 */
#define AOUT_MAGIC	A_MAGIC

/*
 *  machine dependent definitions used by ../port/dat.h
 */

.
44,47c
extern	Mach	mach0;
extern  void	(*kprofp)(ulong);
.
42c
#define	MACHP(n)	(n==0? &mach0 : *(Mach**)0)
.
36,38d
27,33d
20,25d
15d
6,10d
1,4d
## diffname gnot/dat.h 1991/0503
## diff -e /n/bootesdump/1991/0428/sys/src/9/gnot/dat.h /n/bootesdump/1991/0503/sys/src/9/gnot/dat.h
213a
	ushort	svsr;
	ushort	svvo;
.
## diffname gnot/dat.h 1991/0507
## diff -e /n/bootesdump/1991/0503/sys/src/9/gnot/dat.h /n/bootesdump/1991/0507/sys/src/9/gnot/dat.h
217c
	 *  mmu cache for preloading MMU.
	 *  should be replaced by software TLB? -- presotto
.
146a
struct MMU
{
	ulong	va;
	ulong	pa;
};

#define NMMU 16
struct MMUCache
{
	ulong	next;
	MMU	mmu[NMMU];
};

.
65,71d
61,62c
	int	pmmu_dummy;
.
59c
/*
 *  MMU info included in the Proc structure
 */
struct PMMU
.
9a
typedef struct PMMU	PMMU;
.
## diffname gnot/dat.h 1991/0605
## diff -e /n/bootesdump/1991/0507/sys/src/9/gnot/dat.h /n/bootesdump/1991/0605/sys/src/9/gnot/dat.h
230a

struct
{
	Lock;
	short	machs;
	short	exiting;
}active;
.
132a
	int	tlbpurge;
.
120a
/*
 *  character based IO (mouse, keyboard, console screen)
 */
#define NQ	4096
struct IOQ
{
	Lock;
	uchar	buf[NQ];
	uchar	*in;
	uchar	*out;
	int	state;
	Rendez	r;
	union{
		void	(*puts)(IOQ*, void*, int);	/* output */
		int	(*putc)(IOQ*, int);		/* input */
	};
	void	*ptr;
};
struct KIOQ
{
	QLock;
	IOQ;
	int	repeat;
	int	c;
	int	count;
};

extern IOQ	lineq;
extern IOQ	printq;
extern IOQ	mouseq;
extern KIOQ	kbdq;

.
3a
typedef struct IOQ	IOQ;
typedef struct KIOQ	KIOQ;
.
## diffname gnot/dat.h 1991/0607
## diff -e /n/bootesdump/1991/0605/sys/src/9/gnot/dat.h /n/bootesdump/1991/0607/sys/src/9/gnot/dat.h
122,153d
4,5d
## diffname gnot/dat.h 1991/0608
## diff -e /n/bootesdump/1991/0607/sys/src/9/gnot/dat.h /n/bootesdump/1991/0608/sys/src/9/gnot/dat.h
105a
	int	cntrlp;		/* panic on ^P */
.
## diffname gnot/dat.h 1991/0705
## diff -e /n/bootesdump/1991/0608/sys/src/9/gnot/dat.h /n/bootesdump/1991/0705/sys/src/9/gnot/dat.h
214,215d
203d
77,80c
	ulong	nseg;		/* number of segments */
	ulong	nimage;		/* number of page cache image headers */
	ulong 	npagetab;	/* number of pte tables */
	ulong	nswap;		/* number of swap blocks */
.
74a
	ulong	npage;
.
## diffname gnot/dat.h 1991/0706
## diff -e /n/bootesdump/1991/0705/sys/src/9/gnot/dat.h /n/bootesdump/1991/0706/sys/src/9/gnot/dat.h
103a
	int	nlapd;		/* number of dragnet protocol modules */
.
## diffname gnot/dat.h 1991/0717
## diff -e /n/bootesdump/1991/0706/sys/src/9/gnot/dat.h /n/bootesdump/1991/0717/sys/src/9/gnot/dat.h
221a
	Note	lastnote;
.
## diffname gnot/dat.h 1991/0814
## diff -e /n/bootesdump/1991/0717/sys/src/9/gnot/dat.h /n/bootesdump/1991/0814/sys/src/9/gnot/dat.h
203c
#define	NERR	25
.
## diffname gnot/dat.h 1991/0927
## diff -e /n/bootesdump/1991/0814/sys/src/9/gnot/dat.h /n/bootesdump/1991/0927/sys/src/9/gnot/dat.h
185,200c
	void	*virt;
	void	*phys;
	Scsibuf	*next;
.
180,183c
struct Scsibuf
.
12,13c
typedef struct Scsibuf	Scsibuf;
.
## diffname gnot/dat.h 1991/1107
## diff -e /n/bootesdump/1991/0927/sys/src/9/gnot/dat.h /n/bootesdump/1991/1107/sys/src/9/gnot/dat.h
107a
	int	dkif;		/* number of datakit interfaces */
.
## diffname gnot/dat.h 1991/1112
## diff -e /n/bootesdump/1991/1107/sys/src/9/gnot/dat.h /n/bootesdump/1991/1112/sys/src/9/gnot/dat.h
208a
	void	*dbgreg;
.
195d
191a
	FPsave	fpsave;			/* address of this is known by vdb */
.
141c
	int	load;
.
## diffname gnot/dat.h 1991/1114
## diff -e /n/bootesdump/1991/1112/sys/src/9/gnot/dat.h /n/bootesdump/1991/1114/sys/src/9/gnot/dat.h
90a
	int	nmux;		/* number of mux devices */
.
48a
	/* this offset known in db */
.
## diffname gnot/dat.h 1992/0103
## diff -e /n/bootesdump/1991/1114/sys/src/9/gnot/dat.h /n/bootesdump/1992/0103/sys/src/9/gnot/dat.h
214,218d
149,161d
8d
## diffname gnot/dat.h 1992/0122
## diff -e /n/bootesdump/1992/0103/sys/src/9/gnot/dat.h /n/bootesdump/1992/0122/sys/src/9/gnot/dat.h
180a
	uchar	balusave[64];		/* #include botch */
.
## diffname gnot/dat.h 1992/0208
## diff -e /n/bootesdump/1992/0122/sys/src/9/gnot/dat.h /n/bootesdump/1992/0208/sys/src/9/gnot/dat.h
98c
	int	nsubfont;	/* Gsubfont structs (devbit.c) */
.
## diffname gnot/dat.h 1992/0209
## diff -e /n/bootesdump/1992/0208/sys/src/9/gnot/dat.h /n/bootesdump/1992/0209/sys/src/9/gnot/dat.h
97a
	int	nfont;		/* GFont structs (devbit.c) */
.
## diffname gnot/dat.h 1992/0609
## diff -e /n/bootesdump/1992/0209/sys/src/9/gnot/dat.h /n/bootesdump/1992/0609/sys/src/9/gnot/dat.h
110a
	int	nconc;		/* number of datakit concentrators */
.
104a
	int	nisdn;		/* number of isdn interfaces */
.
## diffname gnot/dat.h 1992/0621
## diff -e /n/bootesdump/1992/0609/sys/src/9/gnot/dat.h /n/bootesdump/1992/0621/sys/src/9/gnot/dat.h
107d
102,103d
94d
86,90d
81,82d
79d
77c
	ulong	upages;		/* user page pool */
.
71d
## diffname gnot/dat.h 1992/0622
## diff -e /n/bootesdump/1992/0621/sys/src/9/gnot/dat.h /n/bootesdump/1992/0622/sys/src/9/gnot/dat.h
86,89d
## diffname gnot/dat.h 1992/0625
## diff -e /n/bootesdump/1992/0622/sys/src/9/gnot/dat.h /n/bootesdump/1992/0625/sys/src/9/gnot/dat.h
173a
	Sargs	s;
.
158d
152d
150d
94d
79,87d
## diffname gnot/dat.h 1992/06271
## diff -e /n/bootesdump/1992/0625/sys/src/9/gnot/dat.h /n/bootesdump/1992/06271/sys/src/9/gnot/dat.h
161d
153a
	int	scallnr;		/* sys call number - known by db */
	Sargs	s;			/* address of this is known by db */
.
## diffname gnot/dat.h 1992/0725
## diff -e /n/bootesdump/1992/06271/sys/src/9/gnot/dat.h /n/bootesdump/1992/0725/sys/src/9/gnot/dat.h
84d
## diffname gnot/dat.h 1992/0807
## diff -e /n/bootesdump/1992/0725/sys/src/9/gnot/dat.h /n/bootesdump/1992/0807/sys/src/9/gnot/dat.h
70a
	int	monitor;	/* has display */
.
## diffname gnot/dat.h 1992/0808
## diff -e /n/bootesdump/1992/0807/sys/src/9/gnot/dat.h /n/bootesdump/1992/0808/sys/src/9/gnot/dat.h
141,146d
11d
## diffname gnot/dat.h 1992/0916
## diff -e /n/bootesdump/1992/0808/sys/src/9/gnot/dat.h /n/bootesdump/1992/0916/sys/src/9/gnot/dat.h
138,139d
132c
	union{
.
83c
	int	portispaged;	/* 1 if extended I/O port addresses */
.
## diffname gnot/dat.h 1993/0501 # deleted
## diff -e /n/bootesdump/1992/0916/sys/src/9/gnot/dat.h /n/fornaxdump/1993/0501/sys/src/brazil/gnot/dat.h
1,177d

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.