| plan 9 kernel history: overview | file list | diff list |
2000/1205/port/portdat.h (diff list | history)
| port/portdat.h on 1991/0513 | ||
| 1991/0513 | typedef struct Alarms Alarms; | |
| 1991/0428 | typedef struct Block Block; typedef struct Chan Chan; | |
| 1999/0316 | typedef struct Cmdbuf Cmdbuf; | |
| 1999/0629 | typedef struct Cname Cname; | |
| 1993/0501 | typedef struct Crypt Crypt; | |
| 1991/0428 | typedef struct Dev Dev; typedef struct Dirtab Dirtab; | |
| 1991/0705 | typedef struct Egrp Egrp; | |
| 1992/0623 | typedef struct Evalue Evalue; | |
| 1991/0705 | typedef struct Fgrp Fgrp; | |
| 2000/1205 | typedef struct DevConf DevConf; | |
| 1991/0705 | typedef struct Image Image; | |
| 1991/0428 | typedef struct List List; | |
| 1999/0316 | typedef struct Log Log; typedef struct Logflag Logflag; | |
| 1993/1013 | typedef struct Mntcache Mntcache; | |
| 1991/0428 | 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/0428 | typedef struct Note Note; typedef struct Page Page; | |
| 1991/0705 | typedef struct Palloc Palloc; | |
| 1992/0128 | typedef struct Pgrps Pgrps; | |
| 1991/0428 | typedef struct Pgrp Pgrp; | |
| 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 QLock QLock; typedef struct Queue Queue; typedef struct Ref Ref; typedef struct Rendez Rendez; | |
| 1994/0812 | typedef struct Rgrp Rgrp; | |
| 1991/1011 | typedef struct RWlock RWlock; | |
| 1992/0625 | typedef struct Sargs Sargs; | |
| 1991/0705 | typedef struct Segment Segment; | |
| 1993/0501 | typedef struct Session Session; | |
| 1992/0602 | typedef struct Talarm Talarm; | |
| 1994/0221 | typedef struct Target Target; | |
| 1991/0926 | typedef struct Waitq Waitq; | |
| 1992/0307 | typedef int Devgen(Chan*, Dirtab*, int, int, Dir*); | |
| 1991/0428 | ||
| 1999/0316 | ||
| 1993/0330 | #include <auth.h> #include <fcall.h> | |
| 1992/0619 | ||
| 1991/0428 | struct Ref { Lock; | |
| 1992/0309 | long ref; | |
| 1991/0428 | }; struct Rendez { | |
| 2000/0919 | Lock; | |
| 1991/0428 | Proc *p; }; struct QLock { | |
| 1991/1105 | Lock use; /* to access Qlock structure */ | |
| 1991/0428 | Proc *head; /* next process waiting for object */ Proc *tail; /* last process waiting for object */ | |
| 1991/1002 | int locked; /* flag */ | |
| 1991/0428 | }; | |
| 1991/1011 | struct RWlock { | |
| 1998/0325 | Lock use; Proc *head; /* list of waiting processes */ Proc *tail; | |
| 2000/0107 | ulong wpc; /* pc of writer */ Proc *wproc; /* writing proc */ | |
| 1998/0325 | int readers; /* number of readers */ int writer; /* number of writers */ | |
| 1991/1011 | }; | |
| 1992/0602 | struct Talarm | |
| 1991/0428 | { Lock; | |
| 1992/0602 | Proc *list; | |
| 1991/0428 | }; | |
| 1991/0513 | struct Alarms { | |
| 1992/0516 | QLock; | |
| 1991/0513 | Proc *head; }; | |
| 1993/0806 | #define MAXSYSARG 5 /* for mount(fd, mpt, flag, arg, srv) */ | |
| 1992/0625 | struct Sargs { ulong args[MAXSYSARG]; }; | |
| 1991/0428 | /* | |
| 1993/0501 | * Access types in namec & channel flags | |
| 1991/0428 | */ enum { | |
| 1991/0724 | Aaccess, /* as in access, stat */ Atodir, /* as in chdir */ 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 */ | |
| 1993/1016 | CCACHE = 0x0080, /* client cache */ | |
| 1991/0428 | }; | |
| 1994/0507 | enum { BINTR = (1<<0), BFREE = (1<<1), }; | |
| 1994/0306 | struct Block { | |
| 1994/0321 | Block* next; Block* list; uchar* rp; /* first unconsumed byte */ uchar* wp; /* first empty byte */ uchar* lim; /* 1 past the end of the buffer */ uchar* base; /* start of the buffer */ | |
| 1995/0101 | void (*free)(Block*); | |
| 1994/0507 | ulong flag; | |
| 1994/0306 | }; | |
| 1994/0309 | #define BLEN(s) ((s)->wp - (s)->rp) | |
| 1998/0923 | #define BALLOC(s) ((s)->lim - (s)->base) | |
| 1994/0306 | ||
| 1991/0428 | struct Chan { Ref; | |
| 1994/0225 | Chan* next; /* allocation */ Chan* link; | |
| 1998/0319 | vlong offset; /* in file */ | |
| 1991/0428 | ushort type; | |
| 1994/1124 | ulong dev; | |
| 1991/0428 | ushort mode; /* read/write */ ushort flag; Qid qid; int fid; /* for devmnt */ | |
| 1998/0829 | Mhead* mh; /* mount point that derived Chan */ Mhead* xmh; /* Last mount point crossed */ int uri; /* union read index */ | |
| 1993/0501 | ulong mountid; | |
| 1993/1013 | Mntcache *mcp; /* Mount cache pointer */ | |
| 1991/0428 | union { | |
| 1994/0225 | void* aux; | |
| 1991/0428 | Qid pgrpid; /* for #p/notepg */ | |
| 1994/0225 | Mnt* mntptr; /* for devmnt */ | |
| 1993/0501 | ulong mid; /* for ns in devproc */ | |
| 1998/0306 | char tag[4]; /* for iproute */ | |
| 1991/0428 | }; | |
| 1994/0225 | Chan* mchan; /* channel to mounted server */ | |
| 1991/0428 | Qid mqid; /* qid of root of mount point */ | |
| 1994/0225 | Session*session; | |
| 1999/0629 | Cname *name; | |
| 1991/0428 | }; | |
| 1999/0629 | struct Cname { Ref; int alen; /* allocated length */ int len; /* strlen(s) */ char *s; }; | |
| 1991/0428 | struct Dev { | |
| 1997/0408 | int dc; char* name; | |
| 1992/0824 | 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*); | |
| 1998/0319 | long (*read)(Chan*, void*, long, vlong); | |
| 1995/0108 | Block* (*bread)(Chan*, long, ulong); | |
| 1998/0319 | long (*write)(Chan*, void*, long, vlong); | |
| 1995/0108 | long (*bwrite)(Chan*, Block*, ulong); | |
| 1992/0824 | void (*remove)(Chan*); void (*wstat)(Chan*, char*); | |
| 2000/1122 | void (*power)(int); /* power mgt: power(1) → on, power (0) → off */ | |
| 2000/1205 | int (*config)(int, char*, DevConf*); | |
| 1991/0428 | }; struct Dirtab { char name[NAMELEN]; Qid qid; | |
| 1998/0617 | Length; | |
| 1991/0428 | long perm; | |
| 1992/0808 | }; | |
| 1992/0824 | ||
| 1993/0501 | enum { NSMAX = 1000, NSLOG = 7, NSCACHE = (1<<NSLOG), }; | |
| 1994/0225 | struct Mntwalk /* state for /proc/#/ns */ | |
| 1993/0501 | { | |
| 1999/0629 | int cddone; | |
| 1993/0501 | ulong id; | |
| 1994/0225 | Mhead* mh; Mount* cm; | |
| 1993/0501 | }; | |
| 1991/0428 | struct Mount { ulong mountid; | |
| 1994/0225 | Mount* next; Mhead* head; | |
| 1994/0613 | Mount* copy; Mount* order; | |
| 1994/0225 | Chan* to; /* channel replacing channel */ | |
| 1993/0501 | int flag; char spec[NAMELEN]; | |
| 1991/0428 | }; | |
| 1991/1011 | struct Mhead | |
| 1991/0428 | { | |
| 1998/0829 | Ref; RWlock lock; | |
| 1994/0225 | Chan* from; /* channel mounted upon */ Mount* mount; /* what's mounted upon it */ 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 */ | |
| 1999/1105 | ulong id; /* Multiplexer id for channel check */ | |
| 1993/0501 | Mnt *list; /* Free list */ | |
| 1999/1105 | int flags; /* cache */ | |
| 1993/0501 | int blocksize; /* read/write block size */ | |
| 1993/1121 | char *partial; /* Outstanding read data */ int npart; /* Sizeof remains */ | |
| 1993/0501 | }; | |
| 1992/0307 | enum { | |
| 1991/0428 | NUser, /* note provided externally */ | |
| 1991/1105 | NExit, /* deliver note quietly */ NDebug, /* print debug message */ | |
| 1991/0428 | }; struct Note { char msg[ERRLEN]; int flag; /* whether system posted it */ }; | |
| 1992/0625 | enum { | |
| 1993/0811 | PG_NOFLUSH = 0, | |
| 2000/0123 | PG_TXTFLUSH = 1, /* flush dcache and invalidate icache */ PG_DATFLUSH = 2, /* flush both i & d caches (UNUSED) */ | |
| 1993/1212 | PG_NEWCOL = 3, /* page has been recolored */ | |
| 1993/0501 | PG_MOD = 0x01, /* software modified bit */ PG_REF = 0x02, /* software referenced bit */ | |
| 1992/0625 | }; | |
| 1991/0428 | ||
| 1991/0705 | struct Page | |
| 1991/0428 | { | |
| 1992/0625 | Lock; | |
| 1991/0705 | ulong pa; /* Physical address in memory */ ulong va; /* Virtual address for user */ ulong daddr; /* Disc address on swap */ ushort ref; /* Reference count */ char modref; /* Simulated modify/reference bits */ | |
| 1993/0817 | char color; /* Cache coloring */ | |
| 1991/0705 | char cachectl[MAXMACH]; /* Cache flushing control for putmmu */ Image *image; /* Associated text or swap image */ Page *next; /* Lru free list */ Page *prev; Page *hash; /* Image hash chains */ }; struct Swapalloc { | |
| 1991/0724 | Lock; /* Free map lock */ | |
| 1993/0501 | int free; /* currently free swap pages */ | |
| 1995/0319 | 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 */ | |
| 1995/0319 | Rendez pause; | |
| 1993/0501 | ulong highwater; /* Pager start threshold */ ulong headroom; /* Space pager frees under highwater */ | |
| 1991/0705 | }swapalloc; struct Image { Ref; | |
| 1999/1022 | Chan *c; /* channel to text file */ | |
| 1993/0501 | Qid qid; /* Qid for page cache coherence */ | |
| 1991/0428 | Qid mqid; | |
| 1991/0705 | Chan *mchan; ushort type; /* Device type of owning channel */ | |
| 1992/0824 | Segment *s; /* TEXT segment for image if running */ | |
| 1991/0705 | Image *hash; /* Qid hash chains */ Image *next; /* Free list */ | |
| 1994/0817 | int notext; /* no file associated */ | |
| 1991/0428 | }; | |
| 1991/0705 | struct Pte | |
| 1991/0428 | { | |
| 1992/0131 | Page *pages[PTEPERTAB]; /* Page map for this chunk of pte */ Page **first; /* First used entry */ Page **last; /* Last used entry */ Pte *next; /* Free list */ | |
| 1991/0428 | }; | |
| 1991/0705 | /* Segment types */ | |
| 1992/0625 | enum { SG_TYPE = 07, /* Mask type of segment */ SG_TEXT = 00, SG_DATA = 01, SG_BSS = 02, SG_STACK = 03, SG_SHARED = 04, SG_PHYSICAL = 05, SG_SHDATA = 06, | |
| 1997/0516 | SG_MAP = 07, | |
| 1992/0307 | ||
| 1994/0106 | SG_RONLY = 0040, /* Segment is read only */ SG_CEXEC = 0100, /* Detach at exec */ | |
| 1992/0625 | }; | |
| 1991/0705 | #define PG_ONSWAP 1 #define onswap(s) (((ulong)s)&PG_ONSWAP) | |
| 1992/0805 | #define pagedout(s) (((ulong)s)==0 || onswap(s)) #define swapaddr(s) (((ulong)s)&~PG_ONSWAP) | |
| 1991/0705 | #define SEGMAXSIZE (SEGMAPSIZE*PTEMAPMEM) | |
| 1993/0210 | struct Physseg { ulong attr; /* Segment attributes */ char *name; /* Attach name */ ulong pa; /* Physical address */ ulong size; /* Maximum segment size in pages */ Page *(*pgalloc)(Segment*, ulong); /* Allocation if we need it */ void (*pgfree)(Page*); }; | |
| 1991/0705 | struct Segment { Ref; QLock lk; | |
| 1993/0210 | ushort steal; /* Page stealer lock */ ushort type; /* segment type */ ulong base; /* virtual base */ ulong top; /* virtual top */ 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; | |
| 1996/0303 | ulong* profile; /* Tick profile area */ | |
| 1998/0916 | Pte **map; int mapsize; Pte *ssegmap[SSEGMAPSIZE]; | |
| 1991/0705 | }; | |
| 1992/0824 | enum { 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 | }; | |
| 1991/0806 | #define REND(p,s) ((p)->rendhash[(s)%RENDHASH]) | |
| 1991/1011 | #define MOUNTH(p,s) ((p)->mnthash[(s)->qid.path%MNTHASH]) | |
| 1991/0806 | ||
| 1991/0428 | struct Pgrp { Ref; /* also used as a lock when mounting */ | |
| 2000/0322 | int noattach; | |
| 1991/0428 | ulong pgrpid; QLock debug; /* single access via devproc.c */ | |
| 1993/0501 | RWlock ns; /* Namespace n read/one write lock */ QLock nsh; | |
| 1991/1011 | Mhead *mnthash[MNTHASH]; | |
| 1994/0812 | }; struct Rgrp { Ref; | |
| 1991/0806 | Proc *rendhash[RENDHASH]; /* Rendezvous tag hash */ | |
| 1991/0705 | }; struct Egrp { Ref; | |
| 1992/0623 | QLock; Evalue *entries; | |
| 1999/0122 | ulong path; /* qid.path of next Evalue to be allocated */ ulong vers; /* of Egrp */ | |
| 1991/0428 | }; | |
| 1992/0623 | struct Evalue { char *name; char *value; int len; Evalue *link; | |
| 1999/0122 | Qid qid; | |
| 1992/0623 | }; | |
| 1991/0705 | struct Fgrp { Ref; | |
| 1997/0603 | Chan **fd; int nfd; /* number allocated */ | |
| 1991/0705 | int maxfd; /* highest fd in use */ | |
| 1997/0603 | }; enum { DELTAFD = 20 /* incremental increase in Fgrp.fd's */ | |
| 1991/0705 | }; struct Palloc { Lock; | |
| 1992/0619 | ulong p0, p1; /* base of pages in bank 0/1 */ ulong np0, np1; /* number of pages in bank 0/1 */ | |
| 1991/0724 | Page *head; /* most recently used */ Page *tail; /* least recently used */ | |
| 1993/1120 | ulong freecount; /* how many pages on free list now */ | |
| 1991/0724 | ulong user; /* how many user pages */ | |
| 1991/0705 | Page *hash[PGHSIZE]; Lock hashlock; | |
| 1993/1120 | Rendez r; /* Sleep for free mem */ QLock pwait; /* Queue of procs waiting for memory */ | |
| 1993/0806 | ulong cmembase; /* Key memory */ | |
| 1992/0824 | ulong cmemtop; | |
| 1991/0705 | }; | |
| 1991/0926 | struct Waitq { Waitmsg w; Waitq *next; }; | |
| 1991/0807 | enum { | |
| 1992/0501 | RFNAMEG = (1<<0), RFENVG = (1<<1), RFFDG = (1<<2), RFNOTEG = (1<<3), RFPROC = (1<<4), RFMEM = (1<<5), RFNOWAIT = (1<<6), RFCNAMEG = (1<<10), RFCENVG = (1<<11), | |
| 1994/0812 | RFCFDG = (1<<12), RFREND = (1<<13), | |
| 2000/0322 | RFNOMNT = (1<<14), | |
| 1991/0807 | }; | |
| 1991/0428 | /* | |
| 1991/0605 | * process memory segments - NSEG always last ! | |
| 1991/0428 | */ | |
| 1991/0605 | enum { | |
| 1993/0915 | SSEG, TSEG, DSEG, BSEG, ESEG, LSEG, SEG1, SEG2, SEG3, SEG4, NSEG | |
| 1991/0605 | }; | |
| 1991/0428 | enum { | |
| 1992/0625 | Dead = 0, /* Process states */ | |
| 1991/0428 | Moribund, Ready, Scheding, Running, Queueing, | |
| 1998/0806 | QueueingR, | |
| 1998/0325 | QueueingW, | |
| 1991/0428 | Wakeme, Broken, | |
| 1991/0705 | Stopped, | |
| 1991/0806 | Rendezvous, | |
| 1991/0428 | ||
| 1992/0625 | Proc_stopme = 1, /* devproc requests */ Proc_exitme, Proc_traceme, | |
| 1995/0215 | Proc_exitbig, | |
| 1991/0705 | ||
| 1992/0625 | TUser = 0, /* Proc.time */ | |
| 1991/0428 | TSys, TReal, TCUser, TCSys, TCReal, | |
| 1993/0501 | NERR = 15, NNOTE = 5, | |
| 1993/1201 | ||
| 1995/0110 | Nrq = 20, /* number of scheduler priority levels */ | |
| 1998/0606 | PriLock = 0, /* priority for processes waiting on a lock */ | |
| 1995/0110 | PriNormal = 10, /* base priority for normal processes */ PriKproc = 13, /* base priority for kernel processes */ PriRoot = 13, /* base priority for root processes */ | |
| 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]; | |
| 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; | |
| 1993/0501 | char *psstate; /* What /proc/#/status reports */ | |
| 1991/0705 | Segment *seg[NSEG]; | |
| 1999/0108 | QLock seglock; /* locked whenever seg[] changes */ | |
| 1991/0428 | ulong pid; | |
| 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; | |
| 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 */ | |
| 1994/0812 | Rgrp *rgrp; /* Rendez 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 | ||
| 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 | ||
| 1996/1016 | Lock rlock; /* sync sleep/wakeup with postnote */ | |
| 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 */ | |
| 1993/0806 | int newtlb; /* Pager has changed my pte's, I must flush */ | |
| 1991/0806 | ||
| 1998/0512 | ulong rendtag; /* Tag for rendezvous */ | |
| 1993/0501 | 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*); | |
| 1998/0605 | ||
| 1998/0606 | int lockwait; /* waiting for lock to be released */ | |
| 1993/0501 | ||
| 1995/0110 | Mach *wired; Mach *mp; /* machine this process last ran on */ ulong priority; /* priority level */ ulong basepri; /* base priority level */ ulong rt; /* # ticks used since last blocked */ ulong art; /* avg # ticks used since last blocked */ ulong movetime; /* last time process switched processors */ ulong readytime; /* time process went ready */ | |
| 1998/0516 | int preempted; /* true if this process hasn't finished the interrupt * that last preempted it */ | |
| 1999/0110 | ulong qpc; /* pc calling last blocking qlock */ | |
| 1993/1204 | ||
| 1993/0501 | void *ureg; /* User registers for notes */ void *dbgreg; /* User registers for devproc */ | |
| 1993/1013 | Notsave; | |
| 1993/1201 | ||
| 1991/0504 | /* | |
| 1992/0824 | * machine specific MMU | |
| 1991/0504 | */ | |
| 1991/0507 | PMMU; | |
| 1993/1204 | }; | |
| 1992/0824 | enum { PRINTSIZE = 256, | |
| 1992/0826 | MAXCRYPT = 127, | |
| 1992/0824 | NUMSIZE = 12, /* size of formatted number */ MB = (1024*1024), | |
| 1997/0417 | READSTR = 1000, /* temporary buffer size for device reads */ | |
| 1992/0824 | }; | |
| 1991/0428 | extern Conf conf; | |
| 1992/0625 | extern char* conffile; extern int cpuserver; | |
| 1997/0327 | extern Dev* devtab[]; | |
| 1991/1109 | extern char eve[]; | |
| 1993/0330 | extern char hostdomain[]; | |
| 1992/0902 | extern uchar initcode[]; | |
| 1992/0625 | extern FPsave initfp; | |
| 1997/0327 | extern Queue* kbdq; | |
| 1992/0625 | extern Ref noteidalloc; | |
| 1991/1112 | extern int nrdy; | |
| 1993/0501 | extern Palloc palloc; | |
| 1993/0601 | extern Queue *printq; | |
| 1992/0625 | extern char* statename[]; extern Image swapimage; | |
| 1992/0321 | extern char sysname[NAMELEN]; | |
| 1993/0501 | extern Pthash syspt; | |
| 1992/0602 | extern Talarm talarm; | |
| 1991/0428 | ||
| 1992/0824 | enum { CHDIR = 0x80000000L, CHAPPEND = 0x40000000L, CHEXCL = 0x20000000L, | |
| 1993/0323 | CHMOUNT = 0x10000000L, | |
| 1992/0824 | }; | |
| 1992/0318 | /* * auth messages */ | |
| 1992/0625 | enum { | |
| 1992/0318 | FScchal = 1, | |
| 1992/0321 | FSschal, FSok, | |
| 1992/0318 | FSctick, | |
| 1992/0321 | FSstick, FSerr, | |
| 1992/0318 | RXschal = 0, RXstick = 1, | |
| 1993/0501 | AUTHLEN = 8, | |
| 1994/0221 | }; | |
| 1992/1021 | enum { | |
| 1996/0303 | LRESPROF = 3, | |
| 1999/0316 | }; /* * action log */ struct Log { Lock; int opens; char* buf; char *end; char *rptr; int len; | |
| 2000/1018 | int nlog; int minread; | |
| 1999/0316 | int logmask; /* mask of things to debug */ QLock readq; Rendez readr; }; struct Logflag { char* name; int mask; }; struct Cmdbuf { | |
| 1999/0731 | char buf[256]; | |
| 1999/0316 | char *f[16]; int nf; | |
| 1996/0303 | }; | |
| 1994/0814 | ||
| 1994/0407 | extern int nsyscall; | |
| 1998/0811 | ||
| 1999/1230 | #define DEVDOTDOT -1 | |
| 1998/0811 | #pragma varargck argpos print 1 #pragma varargck argpos snprint 3 #pragma varargck argpos sprint 2 #pragma varargck argpos fprint 2 #pragma varargck type "lld" vlong #pragma varargck type "llx" vlong #pragma varargck type "lld" uvlong #pragma varargck type "llx" uvlong #pragma varargck type "lx" void* #pragma varargck type "ld" long #pragma varargck type "lx" long #pragma varargck type "ld" ulong #pragma varargck type "lx" ulong #pragma varargck type "d" int #pragma varargck type "x" int #pragma varargck type "c" int #pragma varargck type "C" int #pragma varargck type "d" uint #pragma varargck type "x" uint #pragma varargck type "c" uint #pragma varargck type "C" uint #pragma varargck type "f" double #pragma varargck type "e" double #pragma varargck type "g" double #pragma varargck type "s" char* #pragma varargck type "S" Rune* #pragma varargck type "r" void #pragma varargck type "%" void #pragma varargck type "I" uchar* #pragma varargck type "V" uchar* #pragma varargck type "E" uchar* #pragma varargck type "M" uchar* | |
| 1999/0517 | #pragma varargck type "p" void* | |