2 void accounttime(void);
3 Timer* addclock0link(void (*)(void), int);
4 Physseg* 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 uvlong beswav(uvlong);
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);
45 void cpushutdown(void);
48 Block* concatblock(Block*);
49 Block* copyblock(Block*, int);
50 void copypage(Page*, Page*);
51 void countpagerefs(ulong*, int);
52 int cread(Chan*, uchar*, int, vlong);
54 void cunmount(Chan*, Chan*);
55 void cupdate(Chan*, uchar*, int, vlong);
56 void cwrite(Chan*, uchar*, int, vlong);
59 int decrypt(void*, void*, int);
61 Proc* dequeueproc(Schedq*, Proc*);
62 Chan* devattach(int, char*);
63 Block* devbread(Chan*, long, ulong);
64 long devbwrite(Chan*, Block*, ulong);
65 Chan* devclone(Chan*);
66 int devconfig(int, char *, DevConf *);
67 Chan* devcreate(Chan*, char*, int, ulong);
68 void devdir(Chan*, Qid, char*, vlong, char*, long, Dir*);
69 long devdirread(Chan*, char*, long, Dirtab*, int, Devgen*);
73 Chan* devopen(Chan*, int, Dirtab*, int, Devgen*);
74 void devpermcheck(char*, ulong, int);
76 void devremove(Chan*);
78 void devshutdown(void);
79 int devstat(Chan*, uchar*, int, Dirtab*, int, Devgen*);
80 Walkqid* devwalk(Chan*, Chan*, char**, int, Dirtab*, int, Devgen*);
81 int devwstat(Chan*, uchar*, int);
84 void dumpaproc(Proc*);
90 char* edfadmit(Proc*);
92 void edfrecord(Proc*);
93 void edfrun(Proc*, int);
97 int encrypt(void*, void*, int);
98 void envcpy(Egrp*, Egrp*);
99 int eqchan(Chan*, Chan*, int);
100 int eqchantdqid(Chan*, int, int, Qid, int);
104 uintptr execregs(uintptr, ulong, ulong);
105 void exhausted(char*);
107 uvlong fastticks(uvlong*);
108 uvlong fastticks2ns(uvlong);
109 uvlong fastticks2us(uvlong);
110 int fault(uintptr, uintptr, int);
111 void fdclose(int, int);
112 Chan* fdtochan(int, int, int, int);
113 int findmount(Chan**, Mhead**, int, int, Qid);
115 void forceclosefgrp(void);
116 void forkchild(Proc*, Ureg*);
120 void freeblist(Block*);
121 int freebroken(void);
122 void freepages(Page*, Page*, ulong);
123 void freepte(Segment*, Pte*);
124 void getcolor(ulong, ulong*, ulong*, ulong*);
125 uintptr getmalloctag(void*);
126 uintptr getrealloctag(void*);
127 void gotolabel(Label*);
128 char* getconfenv(void);
129 long hostdomainwrite(char*, int);
130 long hostownerwrite(char*, int);
131 void (*hwrandbuf)(void*, ulong);
134 uintptr ibrk(uintptr, int);
136 void interrupted(void);
138 ulong imagecached(void);
139 ulong imagereclaim(int);
143 int ioalloc(ulong, ulong, ulong, char*);
145 void iomapinit(ulong);
146 int ioreserve(ulong, ulong, ulong, char*);
147 int ioreservewin(ulong, ulong, ulong, ulong, char*);
148 int iounused(ulong, ulong);
149 int iprint(char*, ...);
153 Segment* isoverlap(uintptr, uintptr);
154 Physseg* findphysseg(char*);
157 void kickpager(void);
159 void kproc(char*, void(*)(void*), void*);
160 void kprocchild(Proc*, void (*)(void));
161 void (*kproftimer)(uintptr);
162 void ksetenv(char*, char*, int);
163 void kstrcpy(char*, char*, int);
164 void kstrdup(char**, char*);
168 char* logctl(Log*, int, char**, Logflag*);
169 void logn(Log*, int, void*, int);
170 long logread(Log*, void*, ulong, long);
171 void log(Log*, int, char*, ...);
172 Cmdtab* lookupcmd(Cmdbuf*, Cmdtab*, int);
173 Page* lookpage(Image*, uintptr);
174 #define MS2NS(n) (((vlong)(n))*1000000LL)
176 void* mallocz(ulong, int);
178 void* mallocalign(ulong, ulong, long, ulong);
179 void mallocsummary(void);
180 void memmapdump(void);
181 uvlong memmapnext(uvlong, ulong);
182 uvlong memmapsize(uvlong, uvlong);
183 void memmapadd(uvlong, uvlong, ulong);
184 uvlong memmapalloc(uvlong, uvlong, uvlong, ulong);
185 void memmapfree(uvlong, uvlong, ulong);
186 ulong mcountseg(Segment*);
187 void mfreeseg(Segment*, uintptr, ulong);
188 void microdelay(int);
189 uvlong mk64fract(uvlong, uvlong);
190 void mkqid(Qid*, vlong, ulong, int);
191 void mmurelease(Proc*);
192 void mmuswitch(Proc*);
193 Chan* mntattach(Chan*, Chan*, char*, int);
194 Chan* mntauth(Chan*, char*);
195 int mntversion(Chan*, char*, int, int);
196 void mouseresize(void);
197 void mountfree(Mount*);
201 uvlong ms2fastticks(ulong);
202 void mul64fract(uvlong*, uvlong, uvlong);
204 Chan* namec(char*, int, int, ulong);
205 void nameerror(char*, char*);
206 int needpages(void*);
208 int newfd(Chan*, int);
209 Mhead* newmhead(Chan*);
210 Mount* newmount(Chan*, int, char*);
211 Page* newpage(int, Segment **, uintptr);
212 Path* newpath(char*);
216 void nexterror(void);
218 ulong nkpages(Confmem*);
219 uvlong ns2fastticks(uvlong);
220 int okaddr(uintptr, ulong, int);
222 Block* packblock(Block*);
223 Block* padblock(Block*, int);
225 ulong pagereclaim(Image*);
226 void panic(char*, ...);
227 Cmdbuf* parsecmd(char *a, int n);
228 void pathclose(Path*);
229 ulong perfticks(void);
230 void pexit(char*, int);
231 void pgrpcpy(Pgrp*, Pgrp*);
232 ulong pidalloc(Proc*);
233 #define poperror() up->nerrlab--
234 void portcountpagerefs(ulong*, int);
235 int postnote(Proc*, int, char*, int);
236 int pprint(char*, ...);
239 void printinit(void);
240 ulong procalarm(ulong);
242 int procfdprint(Chan*, int, char*, int);
243 void procflushseg(Segment*);
244 void procflushpseg(Physseg*);
245 void procflushothers(void);
246 int procindex(ulong);
247 void procinit0(void);
248 ulong procpagecount(Proc*);
249 void procpriority(Proc*, int, int);
250 void procsetuser(char*);
252 extern void (*proctrace)(Proc*, int, vlong);
253 void procwired(Proc*, int);
256 int pullblock(Block**, int);
257 Block* pullupblock(Block*, int);
258 Block* pullupqueue(Queue*, int);
259 void putimage(Image*);
260 void putmhead(Mhead*);
261 void putmmu(uintptr, uintptr, Page*);
263 void putseg(Segment*);
264 void putstrn(char*, int);
266 ulong pwait(Waitmsg*);
267 int qaddlist(Queue*, Block*);
268 Block* qbread(Queue*, int);
269 long qbwrite(Queue*, Block*);
270 Queue* qbypass(void (*)(void*, Block*), void*);
271 int qcanread(Queue*);
273 int qconsume(Queue*, void*, int);
274 Block* qcopy(Queue*, int, ulong);
275 int qdiscard(Queue*, int);
280 void qhangup(Queue*, char*);
281 int qisclosed(Queue*);
282 int qiwrite(Queue*, void*, int);
285 Queue* qopen(int, int, void (*)(void*), void*);
286 int qpass(Queue*, Block*);
287 int qpassnolim(Queue*, Block*);
288 int qproduce(Queue*, void*, int);
289 void qputback(Queue*, Block*);
290 long qread(Queue*, void*, int);
291 Block* qremove(Queue*);
292 void qreopen(Queue*);
293 void qsetlimit(Queue*, int);
294 void qunlock(QLock*);
296 int qwrite(Queue*, void*, int);
297 void qnoblock(Queue*, int);
298 void randominit(void);
299 ulong randomread(void*, ulong);
300 void ramdiskinit(void);
302 long readblist(Block*, uchar*, long, ulong);
303 int readnum(ulong, char*, ulong, ulong, int);
304 int readstr(ulong, char*, ulong, char*);
306 void* realloc(void *v, ulong size);
307 void rebootcmd(int, char**);
308 void reboot(void*, void*, ulong);
309 void relocateseg(Segment*, uintptr);
310 void renameuser(char*, char*);
312 void resrcwait(char*);
316 void runlock(RWlock*);
318 void savefpregs(FPsave*);
320 void schedinit(void);
321 void (*screenputs)(char*, int);
322 void* secalloc(ulong);
325 uintptr segattach(int, char *, uintptr, uintptr);
326 void segclock(uintptr);
327 long segio(Segio*, Segment*, void*, long, vlong, int);
328 void segpage(Segment*, Page*);
329 int setcolor(ulong, ulong, ulong, ulong);
330 void setkernur(Ureg*, Proc*);
331 int setlabel(Label*);
332 void setmalloctag(void*, uintptr);
333 ulong setnoteid(Proc*, ulong);
334 void setrealloctag(void*, uintptr);
335 void setregisters(Ureg*, char*, char*, int);
336 void setupwatchpts(Proc*, Watchpt*, int);
337 char* skipslash(char*);
338 void sleep(Rendez*, int(*)(void*), void*);
339 void* smalloc(ulong);
344 char* srvname(Chan*);
345 void srvrenameuser(char*, char*);
346 void shrrenameuser(char*, char*);
347 int swapcount(uintptr);
349 void syscallfmt(ulong syscallno, uintptr pc, va_list list);
350 void sysretfmt(ulong syscallno, va_list list, uintptr ret, uvlong start, uvlong stop);
351 void timeradd(Timer*);
352 void timerdel(Timer*);
353 void timersinit(void);
354 void timerintr(Ureg*, Tval);
357 #define TK2MS(x) ((x)*(1000/HZ))
358 uvlong tod2fastticks(vlong);
359 vlong todget(vlong*);
360 void todsetfreq(vlong);
362 void todset(vlong, vlong, int);
363 Block* trimblock(Block*, int, int);
364 void tsleep(Rendez*, int (*)(void*), void*, ulong);
365 void twakeup(Ureg*, Timer *);
366 int uartctl(Uart*, char*);
368 void uartkick(void*);
369 void uartmouse(char*, int (*)(Queue*, int), int);
370 void uartsetmouseputc(char*, int (*)(Queue*, int));
372 void uartputs(char*, int);
373 void uartrecv(Uart*, char);
374 int uartstageoutput(Uart*);
376 void uncachepage(Page*);
377 long unionread(Chan*, void*, long);
379 uvlong us2fastticks(uvlong);
381 uintptr userpc(void);
382 long userwrite(char*, int);
383 void validaddr(uintptr, ulong, int);
384 void validname(char*, int);
385 char* validnamedup(char*, int);
386 void validstat(uchar*, int);
387 void* vmemchr(void*, int, ulong);
388 Proc* wakeup(Rendez*);
389 int walk(Chan**, char**, int, int, int*);
391 void wunlock(RWlock*);
393 void* xallocz(ulong, int);
395 void xhole(uintptr, uintptr);
397 int xmerge(void*, void*);
398 void* xspanalloc(ulong, int, ulong);
401 Segment* data2txt(Segment*);
402 Segment* dupseg(Segment**, int, int);
403 Segment* newseg(int, uintptr, ulong);
404 Segment* seg(Proc*, uintptr, int);
405 Segment* txt2data(Segment*);
406 void hnputv(void*, uvlong);
407 void hnputl(void*, uint);
408 void hnputs(void*, ushort);
409 uvlong nhgetv(void*);
411 ushort nhgets(void*);
415 #pragma varargck argpos iprint 1
416 #pragma varargck argpos panic 1
417 #pragma varargck argpos pprint 1