| plan 9 kernel history: overview | file list | diff list |
1993/0501/port/portdat.h (diff list | history)
| 1993/0407/sys/src/9/port/portdat.h:2,7 – 1993/0501/sys/src/9/port/portdat.h:2,8 (short | long | prev | next) | ||
|
Convert to Brazil XXX.
Add Crypt, Mntrpc, Mntwalk, Path, Pthash. Comment edits. Format edits. In Chan: add link, path, xmnt, mid. Remove ScsiExtread (XXX). Add NS* enums. In Mount: add flag, spec. Add PG_DATINVALID. Add Segment.lock (XXX). Add NERR, NNOTE. In Proc: add kstack, remove qlock, hasspin, add kpfun, kparg, fpsave, scallnr, s, nerrlab, errlab, error, elem, slash, dot, note, nnote, notified, lastnote, notify, ureg, dbgreg, svstatus, svr1. Add second int cpuserver. Add palloc. Add syspt. Add AUTHLEN (XXX). rsc Fri Mar 4 12:44:25 2005 | ||
| 1991/0428 | typedef struct Block Block; typedef struct Blist Blist; typedef struct Chan Chan; | |
| 1993/0501 | typedef struct Crypt Crypt; | |
| 1991/0428 | typedef struct Dev Dev; typedef struct Dirtab Dirtab; | |
| 1991/0705 | typedef struct Egrp Egrp; | |
| 1993/0407/sys/src/9/port/portdat.h:13,18 – 1993/0501/sys/src/9/port/portdat.h:14,21 | ||
| 1991/0607 | typedef struct KIOQ KIOQ; | |
| 1991/0428 | typedef struct List List; typedef struct Mount Mount; | |
| 1993/0501 | typedef struct Mntrpc Mntrpc; typedef struct Mntwalk Mntwalk; | |
| 1992/0620 | typedef struct Mnt Mnt; | |
| 1991/1011 | typedef struct Mhead Mhead; | |
| 1991/1115 | typedef struct Netinf Netinf; | |
| 1993/0407/sys/src/9/port/portdat.h:20,25 – 1993/0501/sys/src/9/port/portdat.h:23,29 | ||
| 1991/1106 | typedef struct Network Network; | |
| 1991/0428 | typedef struct Note Note; typedef struct Page Page; | |
| 1993/0501 | typedef struct Path Path; | |
| 1991/0705 | typedef struct Palloc Palloc; | |
| 1992/0128 | typedef struct Pgrps Pgrps; | |
| 1991/0428 | typedef struct Pgrp Pgrp; | |
| 1993/0407/sys/src/9/port/portdat.h:26,31 – 1993/0501/sys/src/9/port/portdat.h:30,36 | ||
| 1993/0210 | typedef struct Physseg Physseg; | |
| 1991/0428 | typedef struct Proc Proc; | |
| 1991/0705 | typedef struct Pte Pte; | |
| 1993/0501 | typedef struct Pthash Pthash; | |
| 1991/0428 | typedef struct Qinfo Qinfo; typedef struct QLock QLock; typedef struct Queue Queue; | |
| 1993/0407/sys/src/9/port/portdat.h:33,43 – 1993/0501/sys/src/9/port/portdat.h:38,48 | ||
| 1991/0428 | typedef struct Rendez Rendez; | |
| 1991/1011 | typedef struct RWlock RWlock; | |
| 1992/0625 | typedef struct Sargs Sargs; | |
| 1993/0330 |
| |
| 1992/0808 | typedef struct Scsi Scsi; typedef struct Scsibuf Scsibuf; typedef struct Scsidata Scsidata; | |
| 1991/0705 | typedef struct Segment Segment; | |
| 1993/0501 | typedef struct Session Session; | |
| 1991/0428 | typedef struct Stream Stream; | |
| 1992/0602 | typedef struct Talarm Talarm; | |
| 1991/0926 | typedef struct Waitq Waitq; | |
| 1993/0407/sys/src/9/port/portdat.h:128,134 – 1993/0501/sys/src/9/port/portdat.h:133,139 | ||
| 1991/0428 | }; /* | |
| 1993/0501 | * Access types in namec & channel flags | |
| 1991/0428 | */ enum { | |
| 1993/0407/sys/src/9/port/portdat.h:137,178 – 1993/0501/sys/src/9/port/portdat.h:142,192 | ||
| 1991/0724 | Aopen, /* for i/o */ Amount, /* to be mounted upon */ Acreate, /* file is to be created */ | |
| 1993/0501 | COPEN = 0x0001, /* for i/o */ CMSG = 0x0002, /* the message channel for a mount */ CCREATE = 0x0004, /* permits creation if c->mnt */ CCEXEC = 0x0008, /* close on exec */ CFREE = 0x0010, /* not in use */ CRCLOSE = 0x0020, /* remove on close */ CRECOV = 0x0040, /* requires recovery */ | |
| 1991/0428 | }; | |
| 1991/0724 |
| |
| 1991/1011 |
| |
| 1991/0724 |
| |
| 1992/0811 |
| |
| 1993/0501 | struct Path { Ref; Path *hash; Path *parent; Pthash *pthash; char elem[NAMELEN]; }; | |
| 1991/0428 | struct Chan { Ref; | |
| 1993/0501 | Chan *next; /* allocation */ Chan *link; ulong offset; /* in file */ | |
| 1991/0428 | ushort type; ushort dev; ushort mode; /* read/write */ ushort flag; Qid qid; | |
| 1992/0318 | Stream *stream; /* for stream channels */ | |
| 1993/0501 | Path *path; Mount *mnt; /* mount point that derived Chan */ Mount *xmnt; /* Last mount point crossed */ ulong mountid; | |
| 1991/0428 | union { void *aux; Qid pgrpid; /* for #p/notepg */ | |
| 1992/0620 | Mnt *mntptr; /* for devmnt */ | |
| 1993/0501 | ulong mid; /* for ns in devproc */ | |
| 1991/0428 | }; Chan *mchan; /* channel to mounted server */ Qid mqid; /* qid of root of mount point */ | |
| 1993/0330 |
| |
| 1993/0501 | Session *session; | |
| 1991/0428 | }; struct Dev | |
| 1993/0407/sys/src/9/port/portdat.h:231,238 – 1993/0501/sys/src/9/port/portdat.h:245,250 | ||
| 1992/0808 | ScsiGetcap = 0x25, ScsiRead = 0x08, ScsiWrite = 0x0a, | |
| 1993/0407 |
| |
| 1992/0808 | ||
| 1992/0824 | /* data direction */ | |
| 1992/0808 | ScsiIn = 1, | |
| 1993/0407/sys/src/9/port/portdat.h:298,309 – 1993/0501/sys/src/9/port/portdat.h:310,345 | ||
| 1991/0607 | int count; }; | |
| 1992/0307 | ||
| 1993/0501 | enum { NSMAX = 1000, NSLOG = 7, NSCACHE = (1<<NSLOG), }; struct Pthash { QLock; int npt; Path *root; Path *hash[NSCACHE]; }; struct Mntwalk { ulong id; Mhead *mh; Mount *cm; }; | |
| 1991/0428 | struct Mount { ulong mountid; Mount *next; | |
| 1991/1011 | Mhead *head; | |
| 1993/0501 | Chan *to; /* channel replacing channel */ int flag; char spec[NAMELEN]; | |
| 1991/0428 | }; | |
| 1991/1011 | struct Mhead | |
| 1993/0407/sys/src/9/port/portdat.h:313,318 – 1993/0501/sys/src/9/port/portdat.h:349,372 | ||
| 1991/1011 | Mhead *hash; /* Hash chain */ | |
| 1991/0428 | }; | |
| 1993/0501 | struct Mnt { Ref; /* Count of attached channels */ Chan *c; /* Channel to file service */ Proc *rip; /* Reader in progress */ Mntrpc *queue; /* Queue of pending requests on this channel */ Mntrpc *recwait; /* List of rpc's with recovery pending */ ulong id; /* Multiplexor id for channel check */ Mnt *list; /* Free list */ char mux; /* Set if the device does the multiplexing */ char recov; /* Run recovery if channel is lost */ char recprog; /* Recovery in progress */ int blocksize; /* read/write block size */ ushort flushtag; /* Tag to send flush on */ ushort flushbase; /* Base tag of flush window for this buffer */ Pthash tree; /* Path names from this mount point */ }; | |
| 1992/0307 | enum { | |
| 1991/0428 | NUser, /* note provided externally */ | |
| 1993/0407/sys/src/9/port/portdat.h:328,338 – 1993/0501/sys/src/9/port/portdat.h:382,393 | ||
| 1991/0428 | ||
| 1992/0625 | enum { | |
| 1993/0501 | PG_TXTFLUSH = 1<<1, /* flush icache */ PG_DATFLUSH = 1<<2, /* flush both i & d caches */ PG_DATINVALID = 1<<3, /* invalidate d cache */ PG_MOD = 0x01, /* software modified bit */ PG_REF = 0x02, /* software referenced bit */ | |
| 1992/0625 | }; | |
| 1991/0428 | ||
| 1991/0705 | struct Page | |
| 1993/0407/sys/src/9/port/portdat.h:342,347 – 1993/0501/sys/src/9/port/portdat.h:397,403 | ||
| 1991/0705 | ulong va; /* Virtual address for user */ ulong daddr; /* Disc address on swap */ ushort ref; /* Reference count */ | |
| 1993/0501 | char lock; /* Software lock */ | |
| 1991/0705 | char modref; /* Simulated modify/reference bits */ char cachectl[MAXMACH]; /* Cache flushing control for putmmu */ Image *image; /* Associated text or swap image */ | |
| 1993/0407/sys/src/9/port/portdat.h:353,373 – 1993/0501/sys/src/9/port/portdat.h:409,429 | ||
| 1991/0705 | struct Swapalloc { | |
| 1991/0724 | Lock; /* Free map lock */ | |
| 1993/0501 | int free; /* currently free swap pages */ | |
| 1992/0912 | uchar *swmap; /* Base of swap map in memory */ uchar *alloc; /* Round robin allocator */ uchar *last; /* Speed swap allocation */ uchar *top; /* Top of swap map */ | |
| 1991/0724 | Rendez r; /* Pager kproc idle sleep */ | |
| 1992/0303 |
| |
| 1992/0824 |
| |
| 1993/0501 | ulong highwater; /* Pager start threshold */ ulong headroom; /* Space pager frees under highwater */ | |
| 1991/0705 | }swapalloc; struct Image { Ref; | |
| 1993/0501 | Chan *c; /* channl to text file */ Qid qid; /* Qid for page cache coherence */ | |
| 1991/0428 | Qid mqid; | |
| 1991/0705 | Chan *mchan; ushort type; /* Device type of owning channel */ | |
| 1993/0407/sys/src/9/port/portdat.h:428,437 – 1993/0501/sys/src/9/port/portdat.h:484,493 | ||
| 1993/0210 | ulong size; /* size in pages */ ulong fstart; /* start address in file for demand load */ ulong flen; /* length of segment in file */ | |
| 1993/0501 | int flushme; /* maintain icache for this segment */ | |
| 1993/0210 | Image *image; /* text in file attached to this segment */ Physseg *pseg; | |
| 1991/0705 |
| |
| 1993/0501 | Pte *map[SEGMAPSIZE]; | |
| 1991/0705 | }; | |
| 1992/0824 | enum | |
| 1993/0407/sys/src/9/port/portdat.h:438,444 – 1993/0501/sys/src/9/port/portdat.h:494,500 | ||
| 1992/0824 | { RENDHASH = 32, /* Hash to lookup rendezvous tags */ MNTHASH = 32, /* Hash to walk mount table */ | |
| 1993/0501 | NFD = 100, /* per process file descriptors */ | |
| 1992/1209 | PGHLOG = 9, PGHSIZE = 1<<PGHLOG, /* Page hash for image lookup */ | |
| 1992/0824 | }; | |
| 1993/0407/sys/src/9/port/portdat.h:451,457 – 1993/0501/sys/src/9/port/portdat.h:507,514 | ||
| 1991/0705 | Pgrp *next; /* free list */ | |
| 1991/0428 | ulong pgrpid; QLock debug; /* single access via devproc.c */ | |
| 1991/1011 |
| |
| 1993/0501 | RWlock ns; /* Namespace n read/one write lock */ QLock nsh; | |
| 1991/1011 | Mhead *mnthash[MNTHASH]; | |
| 1991/0806 | Proc *rendhash[RENDHASH]; /* Rendezvous tag hash */ | |
| 1991/0705 | }; | |
| 1993/0407/sys/src/9/port/portdat.h:549,615 – 1993/0501/sys/src/9/port/portdat.h:606,697 | ||
| 1991/0428 | TCUser, TCSys, TCReal, | |
| 1993/0501 | NERR = 15, NNOTE = 5, | |
| 1991/0428 | }; struct Proc { | |
| 1993/0501 | Label sched; /* known to l.s */ char *kstack; /* known to l.s */ Mach *mach; /* machine running this proc */ | |
| 1991/0428 | char text[NAMELEN]; | |
| 1991/1105 | char user[NAMELEN]; | |
| 1991/0428 |
| |
| 1991/0830 |
| |
| 1993/0501 | Proc *rnext; /* next process in run queue */ Proc *qnext; /* next process on queue for a QLock */ QLock *qlock; /* addrof qlock being queued for DEBUG */ | |
| 1991/0428 | int state; | |
| 1992/0428 |
| |
| 1992/0805 |
| |
| 1993/0501 | char *psstate; /* What /proc/#/status reports */ Page *upage; /* page from palloc */ | |
| 1991/0705 | Segment *seg[NSEG]; | |
| 1991/0428 | ulong pid; | |
| 1992/0428 |
| |
| 1993/0501 | ulong noteid; /* Equivalent of note group */ | |
| 1991/0926 |
| |
| 1993/0501 | Lock exl; /* Lock count and waitq */ Waitq *waitq; /* Exited processes wait children */ int nchild; /* Number of living children */ int nwait; /* Number of uncollected wait records */ | |
| 1993/0309 | QLock qwaitr; | |
| 1991/0926 |
| |
| 1993/0501 | Rendez waitr; /* Place to hang out in wait */ | |
| 1991/0428 | Proc *parent; | |
| 1991/0705 |
| |
| 1993/0501 | Pgrp *pgrp; /* Process group for namespace */ Egrp *egrp; /* Environment group */ Fgrp *fgrp; /* File descriptor group */ | |
| 1991/0705 | ||
| 1991/0428 | ulong parentpid; | |
| 1993/0501 | ulong time[6]; /* User, Sys, Real; child U, S, R */ | |
| 1991/0428 | short insyscall; int fpstate; | |
| 1991/1109 | ||
| 1991/1216 |
| |
| 1991/1110 |
| |
| 1991/1109 |
| |
| 1991/1110 |
| |
| 1993/0501 | QLock debug; /* to access debugging elements of User */ Proc *pdbg; /* the debugging process */ ulong procmode; /* proc device file mode */ int hang; /* hang at next exec for debug */ int procctl; /* Control for /proc debugging */ ulong pc; /* DEBUG only */ | |
| 1991/1109 | ||
| 1991/0428 |
| |
| 1992/0602 |
| |
| 1991/0727 |
| |
| 1991/0428 |
| |
| 1991/0513 |
| |
| 1991/0705 |
| |
| 1993/0501 | Rendez *r; /* rendezvous point slept on */ Rendez sleep; /* place for syssleep/debug */ int notepending; /* note issued but not acted on */ int kp; /* true if a kernel process */ Proc *palarm; /* Next alarm time */ ulong alarm; /* Time of call */ int newtlb; /* Pager has changed my pte's so I must flush */ | |
| 1991/0806 |
| |
| 1993/0501 | ulong rendtag; /* Tag for rendezvous */ ulong rendval; /* Value for rendezvous */ Proc *rendhash; /* Hash list for tag values */ | |
| 1992/0602 | ulong twhen; Rendez *trend; Proc *tlink; | |
| 1992/0617 | int (*tfn)(void*); | |
| 1993/0501 | void (*kpfun)(void*); void *kparg; | |
| 1992/0602 | ||
| 1993/0501 | FPsave fpsave; /* address of this is known by db */ int scallnr; /* sys call number - known by db */ Sargs s; /* address of this is known by db */ int nerrlab; Label errlab[NERR]; char error[ERRLEN]; char elem[NAMELEN]; /* last name element from namec */ Chan *slash; Chan *dot; Note note[NNOTE]; short nnote; short notified; /* sysnoted is due */ Note lastnote; int (*notify)(void*, char*); void *ureg; /* User registers for notes */ void *dbgreg; /* User registers for devproc */ ulong svstatus; ulong svr1; | |
| 1991/0504 | /* | |
| 1992/0824 | * machine specific MMU | |
| 1991/0504 | */ | |
| 1993/0407/sys/src/9/port/portdat.h:739,744 – 1993/0501/sys/src/9/port/portdat.h:821,827 | ||
| 1991/0428 | extern Conf conf; | |
| 1992/0625 | extern char* conffile; extern int cpuserver; | |
| 1993/0501 | extern int cpuserver; | |
| 1992/1217 | extern Rune* devchar; | |
| 1991/0428 | extern Dev devtab[]; | |
| 1991/1109 | extern char eve[]; | |
| 1993/0407/sys/src/9/port/portdat.h:750,762 – 1993/0501/sys/src/9/port/portdat.h:833,845 | ||
| 1992/0625 | extern IOQ mouseq; extern Ref noteidalloc; | |
| 1991/1112 | extern int nrdy; | |
| 1993/0501 | extern Palloc palloc; | |
| 1992/0625 | extern IOQ printq; extern char* statename[]; extern Image swapimage; | |
| 1992/0321 | extern char sysname[NAMELEN]; | |
| 1993/0501 | extern Pthash syspt; | |
| 1992/0602 | extern Talarm talarm; | |
| 1992/0625 |
| |
| 1992/0725 |
| |
| 1991/0428 | ||
| 1992/0824 | enum { | |
| 1993/0407/sys/src/9/port/portdat.h:780,785 – 1993/0501/sys/src/9/port/portdat.h:863,870 | ||
| 1992/0318 | RXschal = 0, RXstick = 1, | |
| 1993/0501 | AUTHLEN = 8, | |
| 1992/0318 | }; | |
| 1992/1021 | /* | |