2 |
- |
1 |
void _assert(char*);
|
|
|
2 |
void accounttime(void);
|
|
|
3 |
Timer* addclock0link(void (*)(void), int);
|
|
|
4 |
int addphysseg(Physseg*);
|
|
|
5 |
void addbootfile(char*, uchar*, ulong);
|
|
|
6 |
void addwatchdog(Watchdog*);
|
|
|
7 |
Block* adjustblock(Block*, int);
|
|
|
8 |
void alarmkproc(void*);
|
|
|
9 |
Block* allocb(int);
|
|
|
10 |
int anyhigher(void);
|
|
|
11 |
int anyready(void);
|
|
|
12 |
Image* attachimage(int, Chan*, ulong, ulong);
|
|
|
13 |
Page* auxpage(void);
|
|
|
14 |
Block* bl2mem(uchar*, Block*, int);
|
|
|
15 |
int blocklen(Block*);
|
|
|
16 |
ulong blocksize(ulong);
|
|
|
17 |
void bootlinks(void);
|
|
|
18 |
void cachedel(Image*, ulong);
|
|
|
19 |
void cachepage(Page*, Image*);
|
|
|
20 |
void callwithureg(void(*)(Ureg*));
|
|
|
21 |
char* chanpath(Chan*);
|
|
|
22 |
int canlock(Lock*);
|
|
|
23 |
int canpage(Proc*);
|
|
|
24 |
int canqlock(QLock*);
|
|
|
25 |
int canrlock(RWlock*);
|
|
|
26 |
void chandevinit(void);
|
|
|
27 |
void chandevreset(void);
|
|
|
28 |
void chandevshutdown(void);
|
|
|
29 |
void chanfree(Chan*);
|
|
|
30 |
void checkalarms(void);
|
|
|
31 |
void checkb(Block*, char*);
|
|
|
32 |
void cinit(void);
|
|
|
33 |
Chan* cclone(Chan*);
|
|
|
34 |
void cclose(Chan*);
|
|
|
35 |
void ccloseq(Chan*);
|
|
|
36 |
void closeegrp(Egrp*);
|
|
|
37 |
void closefgrp(Fgrp*);
|
|
|
38 |
void closepgrp(Pgrp*);
|
|
|
39 |
void closergrp(Rgrp*);
|
|
|
40 |
long clrfpintr(void);
|
|
|
41 |
void cmderror(Cmdbuf*, char*);
|
|
|
42 |
int cmount(Chan**, Chan*, int, char*);
|
|
|
43 |
void confinit(void);
|
|
|
44 |
int consactive(void);
|
|
|
45 |
void (*consdebug)(void);
|
|
|
46 |
void copen(Chan*);
|
|
|
47 |
Block* concatblock(Block*);
|
|
|
48 |
Block* copyblock(Block*, int);
|
|
|
49 |
void copypage(Page*, Page*);
|
|
|
50 |
void countpagerefs(ulong*, int);
|
|
|
51 |
int cread(Chan*, uchar*, int, vlong);
|
|
|
52 |
void cunmount(Chan*, Chan*);
|
|
|
53 |
void cupdate(Chan*, uchar*, int, vlong);
|
|
|
54 |
void cwrite(Chan*, uchar*, int, vlong);
|
|
|
55 |
ulong dbgpc(Proc*);
|
|
|
56 |
long decref(Ref*);
|
|
|
57 |
int decrypt(void*, void*, int);
|
|
|
58 |
void delay(int);
|
|
|
59 |
Proc* dequeueproc(Schedq*, Proc*);
|
|
|
60 |
Chan* devattach(int, char*);
|
|
|
61 |
Block* devbread(Chan*, long, ulong);
|
|
|
62 |
long devbwrite(Chan*, Block*, ulong);
|
|
|
63 |
Chan* devclone(Chan*);
|
|
|
64 |
int devconfig(int, char *, DevConf *);
|
|
|
65 |
void devcreate(Chan*, char*, int, ulong);
|
|
|
66 |
void devdir(Chan*, Qid, char*, vlong, char*, long, Dir*);
|
|
|
67 |
long devdirread(Chan*, char*, long, Dirtab*, int, Devgen*);
|
|
|
68 |
Devgen devgen;
|
|
|
69 |
void devinit(void);
|
|
|
70 |
int devno(int, int);
|
|
|
71 |
Chan* devopen(Chan*, int, Dirtab*, int, Devgen*);
|
|
|
72 |
void devpermcheck(char*, ulong, int);
|
|
|
73 |
void devpower(int);
|
|
|
74 |
void devremove(Chan*);
|
|
|
75 |
void devreset(void);
|
|
|
76 |
void devshutdown(void);
|
|
|
77 |
int devstat(Chan*, uchar*, int, Dirtab*, int, Devgen*);
|
|
|
78 |
Walkqid* devwalk(Chan*, Chan*, char**, int, Dirtab*, int, Devgen*);
|
|
|
79 |
int devwstat(Chan*, uchar*, int);
|
|
|
80 |
void drawactive(int);
|
|
|
81 |
void drawcmap(void);
|
|
|
82 |
void dumpaproc(Proc*);
|
|
|
83 |
void dumpregs(Ureg*);
|
|
|
84 |
void dumpstack(void);
|
|
|
85 |
Fgrp* dupfgrp(Fgrp*);
|
|
|
86 |
int duppage(Page*);
|
|
|
87 |
void dupswap(Page*);
|
|
|
88 |
void edfinit(Proc*);
|
|
|
89 |
char* edfadmit(Proc*);
|
|
|
90 |
int edfready(Proc*);
|
|
|
91 |
void edfrecord(Proc*);
|
|
|
92 |
void edfrun(Proc*, int);
|
|
|
93 |
void edfstop(Proc*);
|
|
|
94 |
void edfyield(void);
|
|
|
95 |
int emptystr(char*);
|
|
|
96 |
int encrypt(void*, void*, int);
|
|
|
97 |
void envcpy(Egrp*, Egrp*);
|
|
|
98 |
int eqchan(Chan*, Chan*, int);
|
|
|
99 |
int eqchantdqid(Chan*, int, int, Qid, int);
|
|
|
100 |
int eqqid(Qid, Qid);
|
|
|
101 |
void error(char*);
|
|
|
102 |
long execregs(ulong, ulong, ulong);
|
|
|
103 |
void exhausted(char*);
|
|
|
104 |
void exit(int);
|
|
|
105 |
uvlong fastticks(uvlong*);
|
|
|
106 |
uvlong fastticks2ns(uvlong);
|
|
|
107 |
uvlong fastticks2us(uvlong);
|
|
|
108 |
int fault(ulong, int);
|
|
|
109 |
void fdclose(int, int);
|
|
|
110 |
Chan* fdtochan(int, int, int, int);
|
|
|
111 |
int findmount(Chan**, Mhead**, int, int, Qid);
|
|
|
112 |
int fixfault(Segment*, ulong, int, int);
|
|
|
113 |
void flushmmu(void);
|
|
|
114 |
void forceclosefgrp(void);
|
|
|
115 |
void forkchild(Proc*, Ureg*);
|
|
|
116 |
void forkret(void);
|
|
|
117 |
void free(void*);
|
|
|
118 |
void freeb(Block*);
|
|
|
119 |
void freeblist(Block*);
|
|
|
120 |
int freebroken(void);
|
|
|
121 |
void freepte(Segment*, Pte*);
|
|
|
122 |
void getcolor(ulong, ulong*, ulong*, ulong*);
|
|
|
123 |
ulong getmalloctag(void*);
|
|
|
124 |
ulong getrealloctag(void*);
|
|
|
125 |
void gotolabel(Label*);
|
|
|
126 |
char* getconfenv(void);
|
|
|
127 |
int haswaitq(void*);
|
|
|
128 |
long hostdomainwrite(char*, int);
|
|
|
129 |
long hostownerwrite(char*, int);
|
|
|
130 |
void hzsched(void);
|
|
|
131 |
Block* iallocb(int);
|
|
|
132 |
void iallocsummary(void);
|
|
|
133 |
long ibrk(ulong, int);
|
|
|
134 |
void ilock(Lock*);
|
|
|
135 |
void iunlock(Lock*);
|
|
|
136 |
long incref(Ref*);
|
|
|
137 |
void initmark(Watermark *, int, char *);
|
|
|
138 |
void initseg(void);
|
|
|
139 |
int iprint(char*, ...);
|
|
|
140 |
void isdir(Chan*);
|
|
|
141 |
int iseve(void);
|
|
|
142 |
int islo(void);
|
|
|
143 |
Segment* isoverlap(Proc*, ulong, int);
|
|
|
144 |
int ispages(void*);
|
|
|
145 |
int isphysseg(char*);
|
|
|
146 |
void ixsummary(void);
|
|
|
147 |
int kbdcr2nl(Queue*, int);
|
|
|
148 |
int kbdgetmap(uint, int*, int*, Rune*);
|
|
|
149 |
int kbdputc(Queue*, int);
|
|
|
150 |
void kbdputmap(ushort, ushort, Rune);
|
|
|
151 |
void kickpager(void);
|
|
|
152 |
void killbig(char*);
|
|
|
153 |
void kproc(char*, void(*)(void*), void*);
|
|
|
154 |
void kprocchild(Proc*, void (*)(void*), void*);
|
|
|
155 |
void (*kproftimer)(ulong);
|
|
|
156 |
void ksetenv(char*, char*, int);
|
|
|
157 |
void kstrcpy(char*, char*, int);
|
|
|
158 |
void kstrdup(char**, char*);
|
|
|
159 |
ulong l2be(long);
|
|
|
160 |
long latin1(Rune*, int);
|
|
|
161 |
int lock(Lock*);
|
|
|
162 |
void logopen(Log*);
|
|
|
163 |
void logclose(Log*);
|
|
|
164 |
char* logctl(Log*, int, char**, Logflag*);
|
|
|
165 |
void logn(Log*, int, void*, int);
|
|
|
166 |
long logread(Log*, void*, ulong, long);
|
|
|
167 |
void log(Log*, int, char*, ...);
|
|
|
168 |
Cmdtab* lookupcmd(Cmdbuf*, Cmdtab*, int);
|
|
|
169 |
Page* lookpage(Image*, ulong);
|
|
|
170 |
#define MS2NS(n) (((vlong)(n))*1000000LL)
|
|
|
171 |
void machinit(void);
|
|
|
172 |
void* mallocz(ulong, int);
|
|
|
173 |
void* malloc(ulong);
|
|
|
174 |
void* mallocalign(ulong, ulong, long, ulong);
|
|
|
175 |
void mallocsummary(void);
|
|
|
176 |
Block* mem2bl(uchar*, int);
|
|
|
177 |
Block* mem2block(void *, ulong, int);
|
|
|
178 |
void mfreeseg(Segment*, ulong, int);
|
|
|
179 |
void microdelay(int);
|
|
|
180 |
uvlong mk64fract(uvlong, uvlong);
|
|
|
181 |
void mkqid(Qid*, vlong, ulong, int);
|
|
|
182 |
void mmurelease(Proc*);
|
|
|
183 |
void mmuswitch(Proc*);
|
|
|
184 |
Chan* mntauth(Chan*, char*);
|
|
|
185 |
long mntversion(Chan*, char*, int, int);
|
|
|
186 |
void mouseresize(void);
|
|
|
187 |
void mountfree(Mount*);
|
|
|
188 |
ulong ms2tk(ulong);
|
|
|
189 |
ulong msize(void*);
|
|
|
190 |
ulong ms2tk(ulong);
|
|
|
191 |
uvlong ms2fastticks(ulong);
|
|
|
192 |
void mul64fract(uvlong*, uvlong, uvlong);
|
|
|
193 |
void muxclose(Mnt*);
|
|
|
194 |
Chan* namec(char*, int, int, ulong);
|
|
|
195 |
void nameerror(char*, char*);
|
|
|
196 |
Chan* newchan(void);
|
|
|
197 |
int newfd(Chan*);
|
|
|
198 |
Mhead* newmhead(Chan*);
|
|
|
199 |
Mount* newmount(Mhead*, Chan*, int, char*);
|
|
|
200 |
Page* newpage(int, Segment **, ulong);
|
|
|
201 |
Path* newpath(char*);
|
|
|
202 |
Pgrp* newpgrp(void);
|
|
|
203 |
Rgrp* newrgrp(void);
|
|
|
204 |
Proc* newproc(void);
|
|
|
205 |
void nexterror(void);
|
|
|
206 |
void notemark(Watermark *, int);
|
|
|
207 |
int notify(Ureg*);
|
|
|
208 |
int nrand(int);
|
|
|
209 |
uvlong ns2fastticks(uvlong);
|
|
|
210 |
int okaddr(ulong, ulong, int);
|
|
|
211 |
int openmode(ulong);
|
|
|
212 |
Block* packblock(Block*);
|
|
|
213 |
Block* padblock(Block*, int);
|
|
|
214 |
void pagechainhead(Page*);
|
|
|
215 |
void pageinit(void);
|
|
|
216 |
ulong pagenumber(Page*);
|
|
|
217 |
void pagersummary(void);
|
|
|
218 |
void panic(char*, ...);
|
|
|
219 |
Cmdbuf* parsecmd(char *a, int n);
|
|
|
220 |
void pathclose(Path*);
|
|
|
221 |
ulong perfticks(void);
|
|
|
222 |
void pexit(char*, int);
|
|
|
223 |
void pgrpcpy(Pgrp*, Pgrp*);
|
|
|
224 |
void pgrpnote(ulong, char*, long, int);
|
|
|
225 |
void pio(Segment *, ulong, ulong, Page **);
|
|
|
226 |
#define poperror() up->nerrlab--
|
|
|
227 |
void portcountpagerefs(ulong*, int);
|
|
|
228 |
int postnote(Proc*, int, char*, int);
|
|
|
229 |
int pprint(char*, ...);
|
|
|
230 |
int preempted(void);
|
|
|
231 |
void prflush(void);
|
|
|
232 |
void printinit(void);
|
|
|
233 |
ulong procalarm(ulong);
|
|
|
234 |
void procctl(Proc*);
|
|
|
235 |
void procdump(void);
|
|
|
236 |
int procfdprint(Chan*, int, int, char*, int);
|
|
|
237 |
int procindex(ulong);
|
|
|
238 |
void procinit0(void);
|
|
|
239 |
void procflushseg(Segment*);
|
|
|
240 |
void procpriority(Proc*, int, int);
|
|
|
241 |
Proc* proctab(int);
|
|
|
242 |
extern void (*proctrace)(Proc*, int, vlong);
|
|
|
243 |
void procwired(Proc*, int);
|
|
|
244 |
Pte* ptealloc(void);
|
|
|
245 |
Pte* ptecpy(Pte*);
|
|
|
246 |
int pullblock(Block**, int);
|
|
|
247 |
Block* pullupblock(Block*, int);
|
|
|
248 |
Block* pullupqueue(Queue*, int);
|
|
|
249 |
void putimage(Image*);
|
|
|
250 |
void putmhead(Mhead*);
|
|
|
251 |
void putmmu(ulong, ulong, Page*);
|
|
|
252 |
void putpage(Page*);
|
|
|
253 |
void putseg(Segment*);
|
|
|
254 |
void putstrn(char*, int);
|
|
|
255 |
void putswap(Page*);
|
|
|
256 |
ulong pwait(Waitmsg*);
|
|
|
257 |
void qaddlist(Queue*, Block*);
|
|
|
258 |
Block* qbread(Queue*, int);
|
|
|
259 |
long qbwrite(Queue*, Block*);
|
|
|
260 |
Queue* qbypass(void (*)(void*, Block*), void*);
|
|
|
261 |
int qcanread(Queue*);
|
|
|
262 |
void qclose(Queue*);
|
|
|
263 |
int qconsume(Queue*, void*, int);
|
|
|
264 |
Block* qcopy(Queue*, int, ulong);
|
|
|
265 |
int qdiscard(Queue*, int);
|
|
|
266 |
void qflush(Queue*);
|
|
|
267 |
void qfree(Queue*);
|
|
|
268 |
int qfull(Queue*);
|
|
|
269 |
Block* qget(Queue*);
|
|
|
270 |
void qhangup(Queue*, char*);
|
|
|
271 |
int qisclosed(Queue*);
|
|
|
272 |
int qiwrite(Queue*, void*, int);
|
|
|
273 |
int qlen(Queue*);
|
|
|
274 |
void qlock(QLock*);
|
|
|
275 |
Queue* qopen(int, int, void (*)(void*), void*);
|
|
|
276 |
int qpass(Queue*, Block*);
|
|
|
277 |
int qpassnolim(Queue*, Block*);
|
|
|
278 |
int qproduce(Queue*, void*, int);
|
|
|
279 |
void qputback(Queue*, Block*);
|
|
|
280 |
long qread(Queue*, void*, int);
|
|
|
281 |
Block* qremove(Queue*);
|
|
|
282 |
void qreopen(Queue*);
|
|
|
283 |
void qsetlimit(Queue*, int);
|
|
|
284 |
void qunlock(QLock*);
|
|
|
285 |
int qwindow(Queue*);
|
|
|
286 |
int qwrite(Queue*, void*, int);
|
|
|
287 |
void qnoblock(Queue*, int);
|
|
|
288 |
int rand(void);
|
|
|
289 |
void randominit(void);
|
|
|
290 |
ulong randomread(void*, ulong);
|
|
|
291 |
void rdb(void);
|
|
|
292 |
void readn(Chan *, void *, long);
|
|
|
293 |
int readnum(ulong, char*, ulong, ulong, int);
|
|
|
294 |
int readstr(ulong, char*, ulong, char*);
|
|
|
295 |
void ready(Proc*);
|
|
|
296 |
void* realloc(void *v, ulong size);
|
|
|
297 |
void rebootcmd(int, char**);
|
|
|
298 |
void reboot(void*, void*, ulong);
|
|
|
299 |
void relocateseg(Segment*, ulong);
|
|
|
300 |
void renameuser(char*, char*);
|
|
|
301 |
void resched(char*);
|
|
|
302 |
void resrcwait(char*);
|
|
|
303 |
int return0(void*);
|
|
|
304 |
void rlock(RWlock*);
|
|
|
305 |
long rtctime(void);
|
|
|
306 |
void runlock(RWlock*);
|
|
|
307 |
Proc* runproc(void);
|
|
|
308 |
void savefpregs(FPsave*);
|
|
|
309 |
void sched(void);
|
|
|
310 |
void scheddump(void);
|
|
|
311 |
void schedinit(void);
|
|
|
312 |
void (*screenputs)(char*, int);
|
|
|
313 |
long seconds(void);
|
|
|
314 |
ulong segattach(Proc*, ulong, char *, ulong, ulong);
|
|
|
315 |
void segclock(ulong);
|
|
|
316 |
void segpage(Segment*, Page*);
|
|
|
317 |
char* seprintmark(char *, char *, Watermark *);
|
|
|
318 |
int setcolor(ulong, ulong, ulong, ulong);
|
|
|
319 |
void setkernur(Ureg*, Proc*);
|
|
|
320 |
int setlabel(Label*);
|
|
|
321 |
void setmalloctag(void*, ulong);
|
|
|
322 |
void setrealloctag(void*, ulong);
|
|
|
323 |
void setregisters(Ureg*, char*, char*, int);
|
|
|
324 |
void setswapchan(Chan*);
|
|
|
325 |
char* skipslash(char*);
|
|
|
326 |
void sleep(Rendez*, int(*)(void*), void*);
|
|
|
327 |
void* smalloc(ulong);
|
|
|
328 |
int splhi(void);
|
|
|
329 |
int spllo(void);
|
|
|
330 |
void splx(int);
|
|
|
331 |
void splxpc(int);
|
|
|
332 |
char* srvname(Chan*);
|
|
|
333 |
int swapcount(ulong);
|
|
|
334 |
int swapfull(void);
|
|
|
335 |
void swapinit(void);
|
|
|
336 |
void timeradd(Timer*);
|
|
|
337 |
void timerdel(Timer*);
|
|
|
338 |
void timersinit(void);
|
|
|
339 |
void timerintr(Ureg*, Tval);
|
|
|
340 |
void timerset(Tval);
|
|
|
341 |
ulong tk2ms(ulong);
|
|
|
342 |
#define TK2MS(x) ((x)*(1000/HZ))
|
|
|
343 |
uvlong tod2fastticks(vlong);
|
|
|
344 |
vlong todget(vlong*);
|
|
|
345 |
void todsetfreq(vlong);
|
|
|
346 |
void todinit(void);
|
|
|
347 |
void todset(vlong, vlong, int);
|
|
|
348 |
Block* trimblock(Block*, int, int);
|
|
|
349 |
void tsleep(Rendez*, int (*)(void*), void*, ulong);
|
|
|
350 |
int uartctl(Uart*, char*);
|
|
|
351 |
int uartgetc(void);
|
|
|
352 |
void uartkick(void*);
|
|
|
353 |
void uartmouse(Uart*, int (*)(Queue*, int), int);
|
|
|
354 |
void uartsetmouseputc(Uart*, int (*)(Queue*, int));
|
|
|
355 |
void uartputc(int);
|
|
|
356 |
void uartputs(char*, int);
|
|
|
357 |
void uartrecv(Uart*, char);
|
|
|
358 |
int uartstageoutput(Uart*);
|
|
|
359 |
void unbreak(Proc*);
|
|
|
360 |
void uncachepage(Page*);
|
|
|
361 |
long unionread(Chan*, void*, long);
|
|
|
362 |
void unlock(Lock*);
|
|
|
363 |
uvlong us2fastticks(uvlong);
|
|
|
364 |
void userinit(void);
|
|
|
365 |
ulong userpc(void);
|
|
|
366 |
long userwrite(char*, int);
|
|
|
367 |
void validaddr(ulong, ulong, int);
|
|
|
368 |
void validname(char*, int);
|
|
|
369 |
char* validnamedup(char*, int);
|
|
|
370 |
void validstat(uchar*, int);
|
|
|
371 |
void* vmemchr(void*, int, int);
|
|
|
372 |
Proc* wakeup(Rendez*);
|
|
|
373 |
int walk(Chan**, char**, int, int, int*);
|
|
|
374 |
void wlock(RWlock*);
|
|
|
375 |
void wunlock(RWlock*);
|
|
|
376 |
void* xalloc(ulong);
|
|
|
377 |
void* xallocz(ulong, int);
|
|
|
378 |
void xfree(void*);
|
|
|
379 |
void xhole(ulong, ulong);
|
|
|
380 |
void xinit(void);
|
|
|
381 |
int xmerge(void*, void*);
|
|
|
382 |
void* xspanalloc(ulong, int, ulong);
|
|
|
383 |
void xsummary(void);
|
|
|
384 |
void yield(void);
|
|
|
385 |
Segment* data2txt(Segment*);
|
|
|
386 |
Segment* dupseg(Segment**, int, int);
|
|
|
387 |
Segment* newseg(int, ulong, ulong);
|
|
|
388 |
Segment* seg(Proc*, ulong, int);
|
|
|
389 |
void hnputv(void*, uvlong);
|
|
|
390 |
void hnputl(void*, uint);
|
|
|
391 |
void hnputs(void*, ushort);
|
|
|
392 |
uvlong nhgetv(void*);
|
|
|
393 |
uint nhgetl(void*);
|
|
|
394 |
ushort nhgets(void*);
|
|
|
395 |
ulong µs(void);
|
|
|
396 |
void _xinc(long*);
|
|
|
397 |
long _xdec(long*);
|
|
|
398 |
long lcycles(void);
|
|
|
399 |
|
|
|
400 |
#pragma varargck argpos iprint 1
|
|
|
401 |
#pragma varargck argpos panic 1
|
|
|
402 |
#pragma varargck argpos pprint 1
|