plan 9 kernel history: overview | file list | diff list

1991/1011/port/portdat.h (diff list | history)

1991/1002/sys/src/9/port/portdat.h:16,221991/1011/sys/src/9/port/portdat.h:16,22 (short | long | prev | next)
Rename Mtab to Mhead. Add Proc.mnthash, RWlock.
Rename CMOUNT to CMSG. Comment edit.
In Mount: remove Ref, term, rename c to to, add head.
In Mhead: rename c to from, mnt to mount, add hash.
Add MNTHASH, Proc.ns, Proc.mnthash.
rsc Fri Mar 4 12:44:25 2005
1991/0607    
typedef struct KIOQ	KIOQ; 
1991/0428    
typedef struct List	List; 
typedef struct Mount	Mount; 
typedef struct Mtab	Mtab; 
1991/1011    
typedef struct Mhead	Mhead; 
1991/0428    
typedef struct Note	Note; 
typedef struct Page	Page; 
1991/0705    
typedef struct Palloc	Palloc; 
1991/1002/sys/src/9/port/portdat.h:28,331991/1011/sys/src/9/port/portdat.h:28,34
1991/0428    
typedef struct Queue	Queue; 
typedef struct Ref	Ref; 
typedef struct Rendez	Rendez; 
1991/1011    
typedef struct RWlock	RWlock; 
1991/0705    
typedef struct Segment	Segment; 
1991/0428    
typedef struct Stream	Stream; 
1991/0926    
typedef struct Waitq	Waitq; 
1991/1002/sys/src/9/port/portdat.h:59,641991/1011/sys/src/9/port/portdat.h:60,73
1991/1002    
	int	locked;			/* flag */ 
1991/0428    
}; 
 
1991/1011    
struct RWlock 
{ 
	Lock;				/* Lock modify lock */ 
	QLock	x;			/* Mutual exclusion lock */ 
	QLock	k;			/* Lock for waiting writers held for readers */ 
	int	readers;		/* Count of readers in lock */ 
}; 
 
1991/0428    
struct Alarm 
{ 
	List; 
1991/1002/sys/src/9/port/portdat.h:119,1261991/1011/sys/src/9/port/portdat.h:128,135
1991/0428    
 *  Chan.flags 
 */ 
1991/0724    
#define	COPEN	1			/* for i/o */ 
#define	CMOUNT	2			/* is result of a mount/bind */ 
#define	CCREATE	4			/* permits creation if CMOUNT */ 
1991/1011    
#define	CMSG	2			/* is the message channel for a mount */ 
#define	CCREATE	4			/* permits creation if c->mnt */ 
1991/0724    
#define	CCEXEC	8			/* close on exec */ 
#define	CFREE	16			/* not in use */ 
1991/0428    
 
1991/1002/sys/src/9/port/portdat.h:242,2581991/1011/sys/src/9/port/portdat.h:251,267
1991/0607    
 
1991/0428    
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 */ 
1991/1011    
	Mhead	*head; 
	Chan	*to;			/* channel replacing underlying channel */ 
1991/0428    
}; 
 
struct Mtab 
1991/1011    
struct Mhead 
1991/0428    
{ 
	Chan	*c;			/* channel mounted upon */ 
	Mount	*mnt;			/* what's mounted upon it */ 
1991/1011    
	Chan	*from;			/* channel mounted upon */ 
	Mount	*mount;			/* what's mounted upon it */ 
	Mhead	*hash;			/* Hash chain */ 
1991/0428    
}; 
 
enum{ 
1991/1002/sys/src/9/port/portdat.h:362,3671991/1011/sys/src/9/port/portdat.h:371,378
1991/0705    
 
1991/0806    
#define RENDHASH	32 
#define REND(p,s)	((p)->rendhash[(s)%RENDHASH]) 
1991/1011    
#define MNTHASH		32 
#define MOUNTH(p,s)	((p)->mnthash[(s)->qid.path%MNTHASH]) 
1991/0806    
 
1991/0428    
struct Pgrp 
{ 
1991/1002/sys/src/9/port/portdat.h:370,3781991/1011/sys/src/9/port/portdat.h:381,389
1991/0428    
	int	index;			/* index in pgrp table */ 
	ulong	pgrpid; 
	char	user[NAMELEN]; 
	int	nmtab;			/* highest active mount table entry, +1 */ 
	QLock	debug;			/* single access via devproc.c */ 
	Mtab	*mtab; 
1991/1011    
	RWlock	ns;			/* Namespace many read/one write lock */ 
	Mhead	*mnthash[MNTHASH]; 
1991/0806    
	Proc	*rendhash[RENDHASH];	/* Rendezvous tag hash */ 
1991/0705    
}; 
 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)