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*);
12 Image* attachimage(int, Chan*, uintptr, ulong);
14 Block* bl2mem(uchar*, Block*, int);
17 void cachedel(Image*, uintptr);
18 void cachepage(Page*, Image*);
19 void callwithureg(void(*)(Ureg*));
20 char* chanpath(Chan*);
24 int canrlock(RWlock*);
25 void chandevinit(void);
26 void chandevreset(void);
27 void chandevshutdown(void);
29 void checkalarms(void);
30 void checkb(Block*, char*);
35 void closeegrp(Egrp*);
36 void closefgrp(Fgrp*);
37 void closepgrp(Pgrp*);
38 void closergrp(Rgrp*);
40 void cmderror(Cmdbuf*, char*);
41 int cmount(Chan**, Chan*, int, char*);
44 void (*consdebug)(void);
46 Block* concatblock(Block*);
47 Block* copyblock(Block*, int);
48 void copypage(Page*, Page*);
49 void countpagerefs(ulong*, int);
50 int cread(Chan*, uchar*, int, vlong);
51 void cunmount(Chan*, Chan*);
52 void cupdate(Chan*, uchar*, int, vlong);
53 void cwrite(Chan*, uchar*, int, vlong);
56 int decrypt(void*, void*, int);
58 Proc* dequeueproc(Schedq*, Proc*);
59 Chan* devattach(int, char*);
60 Block* devbread(Chan*, long, ulong);
61 long devbwrite(Chan*, Block*, ulong);
62 Chan* devclone(Chan*);
63 int devconfig(int, char *, DevConf *);
64 Chan* devcreate(Chan*, char*, int, ulong);
65 void devdir(Chan*, Qid, char*, vlong, char*, long, Dir*);
66 long devdirread(Chan*, char*, long, Dirtab*, int, Devgen*);
70 Chan* devopen(Chan*, int, Dirtab*, int, Devgen*);
71 void devpermcheck(char*, ulong, int);
73 void devremove(Chan*);
75 void devshutdown(void);
76 int devstat(Chan*, uchar*, int, Dirtab*, int, Devgen*);
77 Walkqid* devwalk(Chan*, Chan*, char**, int, Dirtab*, int, Devgen*);
78 int devwstat(Chan*, uchar*, int);
81 void dumpaproc(Proc*);
87 char* edfadmit(Proc*);
89 void edfrecord(Proc*);
90 void edfrun(Proc*, int);
94 int encrypt(void*, void*, int);
95 void envcpy(Egrp*, Egrp*);
96 int eqchan(Chan*, Chan*, int);
97 int eqchantdqid(Chan*, int, int, Qid, int);
101 uintptr execregs(uintptr, ulong, ulong);
102 void exhausted(char*);
104 uvlong fastticks(uvlong*);
105 uvlong fastticks2ns(uvlong);
106 uvlong fastticks2us(uvlong);
107 int fault(uintptr, int);
108 void fdclose(int, int);
109 Chan* fdtochan(int, int, int, int);
110 int findmount(Chan**, Mhead**, int, int, Qid);
111 int fixfault(Segment*, uintptr, int, int);
113 void forceclosefgrp(void);
114 void forkchild(Proc*, Ureg*);
118 void freeblist(Block*);
119 int freebroken(void);
120 void freepte(Segment*, Pte*);
121 void getcolor(ulong, ulong*, ulong*, ulong*);
122 uintptr getmalloctag(void*);
123 uintptr getrealloctag(void*);
124 void gotolabel(Label*);
125 char* getconfenv(void);
126 long hostdomainwrite(char*, int);
127 long hostownerwrite(char*, int);
130 void iallocsummary(void);
131 long ibrk(uintptr, int);
133 void interrupted(void);
137 int iprint(char*, ...);
141 Segment* isoverlap(Proc*, uintptr, uintptr);
143 int isphysseg(char*);
144 void ixsummary(void);
145 void kickpager(void);
147 void kproc(char*, void(*)(void*), void*);
148 void kprocchild(Proc*, void (*)(void*), void*);
149 void (*kproftimer)(uintptr);
150 void ksetenv(char*, char*, int);
151 void kstrcpy(char*, char*, int);
152 void kstrdup(char**, char*);
156 char* logctl(Log*, int, char**, Logflag*);
157 void logn(Log*, int, void*, int);
158 long logread(Log*, void*, ulong, long);
159 void log(Log*, int, char*, ...);
160 Cmdtab* lookupcmd(Cmdbuf*, Cmdtab*, int);
161 Page* lookpage(Image*, uintptr);
162 #define MS2NS(n) (((vlong)(n))*1000000LL)
164 void* mallocz(ulong, int);
166 void* mallocalign(ulong, ulong, long, ulong);
167 void mallocsummary(void);
168 Block* mem2bl(uchar*, int);
169 ulong mcountseg(Segment*);
170 void mfreeseg(Segment*, uintptr, int);
171 void microdelay(int);
172 uvlong mk64fract(uvlong, uvlong);
173 void mkqid(Qid*, vlong, ulong, int);
174 void mmurelease(Proc*);
175 void mmuswitch(Proc*);
176 Chan* mntauth(Chan*, char*);
177 long mntversion(Chan*, char*, int, int);
178 void mouseresize(void);
179 void mountfree(Mount*);
183 uvlong ms2fastticks(ulong);
184 void mul64fract(uvlong*, uvlong, uvlong);
186 Chan* namec(char*, int, int, ulong);
187 void nameerror(char*, char*);
190 Mhead* newmhead(Chan*);
191 Mount* newmount(Mhead*, Chan*, int, char*);
192 Page* newpage(int, Segment **, uintptr);
193 Path* newpath(char*);
197 void nexterror(void);
200 uvlong ns2fastticks(uvlong);
201 int okaddr(uintptr, ulong, int);
203 Block* packblock(Block*);
204 Block* padblock(Block*, int);
205 void pagechainhead(Page*);
207 ulong pagenumber(Page*);
208 void pagersummary(void);
209 void panic(char*, ...);
210 Cmdbuf* parsecmd(char *a, int n);
211 void pathclose(Path*);
212 ulong perfticks(void);
213 void pexit(char*, int);
214 void pgrpcpy(Pgrp*, Pgrp*);
215 void pgrpnote(ulong, char*, long, int);
217 #define poperror() up->nerrlab--
218 void portcountpagerefs(ulong*, int);
219 int postnote(Proc*, int, char*, int);
220 int pprint(char*, ...);
223 void printinit(void);
224 ulong procalarm(ulong);
227 int procfdprint(Chan*, int, int, char*, int);
228 int procindex(ulong);
229 void procinit0(void);
230 void procflushseg(Segment*);
231 void procpriority(Proc*, int, int);
233 extern void (*proctrace)(Proc*, int, vlong);
234 void procwired(Proc*, int);
237 int pullblock(Block**, int);
238 Block* pullupblock(Block*, int);
239 Block* pullupqueue(Queue*, int);
240 void putimage(Image*);
241 void putmhead(Mhead*);
242 void putmmu(uintptr, uintptr, Page*);
244 void putseg(Segment*);
245 void putstrn(char*, int);
247 ulong pwait(Waitmsg*);
248 void qaddlist(Queue*, Block*);
249 Block* qbread(Queue*, int);
250 long qbwrite(Queue*, Block*);
251 Queue* qbypass(void (*)(void*, Block*), void*);
252 int qcanread(Queue*);
254 int qconsume(Queue*, void*, int);
255 Block* qcopy(Queue*, int, ulong);
256 int qdiscard(Queue*, int);
261 void qhangup(Queue*, char*);
262 int qisclosed(Queue*);
263 int qiwrite(Queue*, void*, int);
266 Queue* qopen(int, int, void (*)(void*), void*);
267 int qpass(Queue*, Block*);
268 int qpassnolim(Queue*, Block*);
269 int qproduce(Queue*, void*, int);
270 void qputback(Queue*, Block*);
271 long qread(Queue*, void*, int);
272 Block* qremove(Queue*);
273 void qreopen(Queue*);
274 void qsetlimit(Queue*, int);
275 void qunlock(QLock*);
277 int qwrite(Queue*, void*, int);
278 void qnoblock(Queue*, int);
280 void randominit(void);
281 ulong randomread(void*, ulong);
283 int readnum(ulong, char*, ulong, ulong, int);
284 int readstr(ulong, char*, ulong, char*);
286 void* realloc(void *v, ulong size);
287 void rebootcmd(int, char**);
288 void reboot(void*, void*, ulong);
289 void relocateseg(Segment*, uintptr);
290 void renameuser(char*, char*);
292 void resrcwait(char*);
296 void runlock(RWlock*);
298 void savefpregs(FPsave*);
300 void scheddump(void);
301 void schedinit(void);
302 void (*screenputs)(char*, int);
304 uintptr segattach(Proc*, ulong, char *, uintptr, uintptr);
305 void segclock(uintptr);
306 void segpage(Segment*, Page*);
307 int setcolor(ulong, ulong, ulong, ulong);
308 void setkernur(Ureg*, Proc*);
309 int setlabel(Label*);
310 void setmalloctag(void*, uintptr);
311 void setrealloctag(void*, uintptr);
312 void setregisters(Ureg*, char*, char*, int);
313 void setswapchan(Chan*);
314 char* skipslash(char*);
315 void sleep(Rendez*, int(*)(void*), void*);
316 void* smalloc(ulong);
321 char* srvname(Chan*);
322 void srvrenameuser(char*, char*);
323 void shrrenameuser(char*, char*);
324 int swapcount(uintptr);
327 void syscallfmt(ulong syscallno, uintptr pc, va_list list);
328 void sysretfmt(ulong syscallno, va_list list, uintptr ret, uvlong start, uvlong stop);
329 void timeradd(Timer*);
330 void timerdel(Timer*);
331 void timersinit(void);
332 void timerintr(Ureg*, Tval);
335 #define TK2MS(x) ((x)*(1000/HZ))
336 uvlong tod2fastticks(vlong);
337 vlong todget(vlong*);
338 void todsetfreq(vlong);
340 void todset(vlong, vlong, int);
341 Block* trimblock(Block*, int, int);
342 void tsleep(Rendez*, int (*)(void*), void*, ulong);
343 int uartctl(Uart*, char*);
345 void uartkick(void*);
346 void uartmouse(char*, int (*)(Queue*, int), int);
347 void uartsetmouseputc(char*, int (*)(Queue*, int));
349 void uartputs(char*, int);
350 void uartrecv(Uart*, char);
351 int uartstageoutput(Uart*);
353 void uncachepage(Page*);
354 long unionread(Chan*, void*, long);
356 uvlong us2fastticks(uvlong);
358 uintptr userpc(void);
359 long userwrite(char*, int);
360 void validaddr(uintptr, ulong, int);
361 void validname(char*, int);
362 char* validnamedup(char*, int);
363 void validstat(uchar*, int);
364 void* vmemchr(void*, int, int);
365 Proc* wakeup(Rendez*);
366 int walk(Chan**, char**, int, int, int*);
368 void wunlock(RWlock*);
370 void* xallocz(ulong, int);
372 void xhole(uintptr, uintptr);
374 int xmerge(void*, void*);
375 void* xspanalloc(ulong, int, ulong);
378 Segment* data2txt(Segment*);
379 Segment* dupseg(Segment**, int, int);
380 Segment* newseg(int, uintptr, ulong);
381 Segment* seg(Proc*, uintptr, int);
382 Segment* txt2data(Segment*);
383 void hnputv(void*, uvlong);
384 void hnputl(void*, uint);
385 void hnputs(void*, ushort);
386 uvlong nhgetv(void*);
388 ushort nhgets(void*);
392 #pragma varargck argpos iprint 1
393 #pragma varargck argpos panic 1
394 #pragma varargck argpos pprint 1