~kris/9p

9hist

ref: 6affaa48b03cee73b8c4b312d63d1efb8d7315e7 9hist/port/portfns.h -rw-r--r-- 6.6 KiB
6affaa48 — David du Colombier Plan 9 from Bell Labs 1992-06-02 34 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
void	alarmkproc(void*);
Block*	allocb(ulong);
int	anyready(void);
void	append(List**, List*);
Image*	attachimage(int, Chan*, ulong, ulong);
int	blen(Block *);
int	bround(Block *, int);
void	buzz(int, int);
void	cachepage(Page*, Image*);
int	cangetc(void*);
int	canlock(Lock*);
int	canpage(Proc*);
int	canputc(void*);
int	canqlock(QLock*);
void	chandevinit(void);
void	chandevreset(void);
void	chanfree(Chan*);
void	chaninit(void);
void	checkalarms(void);
void	clock(Ureg*);
Chan*	clone(Chan*, Chan*);
void	close(Chan*);
void	closeegrp(Egrp*);
void	closefgrp(Fgrp*);
void	closemount(Mount*);
void	closepgrp(Pgrp*);
long	clrfpintr(void);
void	confinit(void);
int	consactive(void);
void	consdebug(void);
Block	*copyb(Block*, int);
Env*	copyenv(Env*, int);
void	copypage(Page*, Page*);
int	decref(Ref*);
int	decrypt(void*, void*, int);
void	delay(int);
void	delete(List**, List*, List*);
void	delete0(List**, List*);
Chan*	devattach(int, char*);
Chan*	devclone(Chan*, Chan*);
void	devdir(Chan*, Qid, char*, long, char*, long, Dir*);
long	devdirread(Chan*, char*, long, Dirtab*, int, Devgen*);
Devgen	devgen;
int	devno(int, int);
Chan*	devopen(Chan*, int, Dirtab*, int, Devgen*);
void	devstat(Chan*, char*, Dirtab*, int, Devgen*);
int	devwalk(Chan*, char*, Dirtab*, int, Devgen*);
void	dumpqueues(void);
void	dumpregs(Ureg*);
void	dumpstack(void);
Fgrp*	dupfgrp(Fgrp*);
void	duppage(Page*);
Segment*	dupseg(Segment*, int);
void	dupswap(Page*);
int	encrypt(void*, void*, int);
void	envcpy(Egrp*, Egrp*);
void	envpgclose(Env*);
void	envpgcopy(Env*, Env*);
int	eqchan(Chan*, Chan*, long);
int	eqqid(Qid, Qid);
void	error(char*);
long	execregs(ulong, ulong, ulong);
void	exhausted(char*);
void	exit(void);
Block*	expandb(Block*, int);
int	fault(ulong, int);
void	fdclose(int, int);
Chan*	fdtochan(int, int, int);
void	firmware(void);
int	fixfault(Segment*, ulong, int, int);
void	flowctl(Queue*, Block*);
void	flushmmu(void);
void	freeb(Block*);
int	freebroken(void);
void	freechan(Chan*);
void	freepte(Segment*, Pte*);
void	freesegs(int);
void	freewaitq(Waitq*);
Block*	getb(Blist*);
int	getc(IOQ*);
void	getcolor(ulong, ulong*, ulong*, ulong*);
int	getfields(char*, char**, int, char);
Block*	getq(Queue*);
int	gets(IOQ*, void*, int);
void	gotolabel(Label*);
void	grpinit(void);
int	hwcursmove(int, int);
int	hwcursset(uchar*, uchar*, int, int);
void*	ialloc(ulong, int);
void*	iallocspan(ulong, int, ulong);
long	ibrk(ulong, int);
int	incref(Ref*);
void	initq(IOQ*);
void	initseg(void);
void	insert(List**, List*, List*);
void	invalidateu(void);
void	isdir(Chan*);
int	ispages(void*);
void	kbdclock(void);
int	kbdcr2nl(IOQ*, int);
int	kbdputc(IOQ*, int);
void	kbdrepeat(int);
void	kickpager(void);
int	kprint(char*, ...);
void	kproc(char*, void(*)(void*), void*);
void	ksetenv(char*, char*);
void	ksetterm(char*);
long	latin1(uchar*);
void	lights(int);
void	lock(Lock*);
void	lockinit(void);
void	lockpage(Page*);
Page*	lookpage(Image*, ulong);
void	machinit(void);
void	mapstack(Proc*);
void	mfreeseg(Segment*, ulong, int);
void	mmurelease(Proc*);
void	mntdump(void);
int	mount(Chan*, Chan*, int);
void	mouseclock(void);
int	mouseputc(IOQ*, int);
Chan*	namec(char*, int, int, ulong);
void	nameok(char*);
void	netdisown(Network*, int);
int	netgen(Chan*, void*, int, int, Dir*);
Chan*	netopen(Chan*, int, Network*);
int	netown(Network*, int, char*, int);
long	netread(Chan*, void*, long, ulong, Network*);
void	netstat(Chan*, char*, Network*);
int	netwalk(Chan*, char*, Network*);
void	netwstat(Chan*, char*, Network*);
Chan*	newchan(void);
Egrp*	newegrp(void);
Fgrp*	newfgrp(void);
Mount*	newmount(Mhead*, Chan*);
Page*	newpage(int, Segment **, ulong);
Pgrp*	newpgrp(void);
Proc*	newproc(void);
void	newqinfo(Qinfo*);
Segment*	newseg(int, ulong, ulong);
Waitq*	newwaitq(void);
char*	nextelem(char*, char*);
void	nexterror(void);
int	nodelims(Stream*);
int	notify(Ureg*);
int	nrand(int);
void	nullput(Queue*, Block*);
int	openmode(ulong);
Block*	padb(Block*, int);
void	pageinit(void);
void	panic(char*, ...);
void	pexit(char*, int);
void	pgrpcpy(Pgrp*, Pgrp*);
void	pgrpnote(ulong, char*, long, int);
Pgrp*	pgrptab(int);
void	pio(Segment *, ulong, ulong, Page **);
#define	poperror()	u->nerrlab--
int	postnote(Proc*, int, char*, int);
int	pprint(char*, ...);
void	printinit(void);
ulong	procalarm(ulong);
void	procctl(Proc*);
void	procdump(void);
void	procinit0(void);
Proc*	proctab(int);
Pte*	ptealloc(void);
Pte*	ptecpy(Pte*);
Block*	pullup(Block *, int);
Queue*	pushq(Stream*, Qinfo*);
int	putb(Blist*, Block*);
void	putbq(Blist*, Block*);
int	putc(IOQ*, int);
void	putimage(Image*);
void	putmmu(ulong, ulong, Page*);
void	putpage(Page*);
int	putq(Queue*, Block*);
void	puts(IOQ*, void*, int);
void	putseg(Segment*);
void	putstr(char*);
void	putstr(char*);
void	putstrn(char*, long);
void	putswap(Page*);
ulong	pwait(Waitmsg*);
Qinfo*	qinfofind(char*);
void	qlock(QLock*);
void	qunlock(QLock*);
int	readnum(ulong, char*, ulong, ulong, int);
void	ready(Proc*);
void	relocateseg(Segment*, ulong);
void	resched(char*);
void	resrcwait(char*);
int	return0(void*);
Proc*	runproc(void);
void	savefpregs(FPsave*);
void	sccclock(void);
void	sccintr(void);
void	sccsetup(void*, ulong);
void	sccspecial(int, IOQ*, IOQ*, int);
void	sched(void);
void	schedinit(void);
int	screenbits(void);
long	seconds(void);
Segment*	seg(Proc*, ulong, int);
ulong	segattach(Proc*, ulong, char *, ulong, ulong);
void	segpage(Segment*, Page*);
int	setcolor(ulong, ulong, ulong, ulong);
int	setlabel(Label*);
void	setregisters(Ureg*, char*, char*, int);
void	setswapchan(Chan*);
void	simpleputpage(Page*);
char*	skipslash(char*);
void	sleep(Rendez*, int(*)(void*), void*);
int	splhi(void);
int	spllo(void);
void	splx(int);
int	streamclose(Chan*);
int	streamclose1(Stream*);
int	streamenter(Stream*);
int	streamexit(Stream*, int);
Devgen	streamgen;
void	streaminit(void);
void	streaminit0(void);
Stream*	streamnew(ushort, ushort, ushort, Qinfo*, int);
void	streamopen(Chan*, Qinfo*);
int	streamparse(char*, Block*);
long	streamread(Chan*, void*, long);
void	streamstat(Chan*, char*, char*);
long	streamwrite(Chan*, void*, long, int);
long	stringread(void*, long, char*, ulong);
void	swapinit(void);
long	syscall(Ureg*);
void	tcpinit(void);
void	tsleep(Rendez*, int (*)(void*), void*, int);
void	uncachepage(Page*);
long	unionread(Chan*, void*, long);
void	unlock(Lock*);
void	unlockpage(Page*);
long	unicode(uchar*);
void	userinit(void);
ulong	userpc(void);
void	validaddr(ulong, ulong, int);
void*	vmemchr(void*, int, int);
void	wakeup(Rendez*);
void	rlock(RWlock*);
void	runlock(RWlock*);
void	wlock(RWlock*);
void	wunlock(RWlock*);
Mhead*	newmnthead(void);
void	mountfree(Mount*);
void	mntheadfree(Mhead*);
void	unmount(Chan*, Chan*);
void	urpfillstats(Chan*, char*, int);