]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/port/portfns.h
audiohda: fix syntax error
[plan9front.git] / sys / src / 9 / port / portfns.h
1 void            _assert(char*);
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*);
9 Block*          allocb(int);
10 int             anyhigher(void);
11 int             anyready(void);
12 Image*          attachimage(int, Chan*, uintptr, ulong);
13 ulong           beswal(ulong);
14 uvlong          beswav(uvlong);
15 int             blocklen(Block*);
16 void            bootlinks(void);
17 void            cachedel(Image*, uintptr);
18 void            cachepage(Page*, Image*);
19 void            callwithureg(void(*)(Ureg*));
20 char*           chanpath(Chan*);
21 int             canlock(Lock*);
22 int             canpage(Proc*);
23 int             canqlock(QLock*);
24 int             canrlock(RWlock*);
25 void            chandevinit(void);
26 void            chandevreset(void);
27 void            chandevshutdown(void);
28 void            chanfree(Chan*);
29 void            checkalarms(void);
30 void            checkb(Block*, char*);
31 void            cinit(void);
32 Chan*           cclone(Chan*);
33 void            cclose(Chan*);
34 void            ccloseq(Chan*);
35 void            closeegrp(Egrp*);
36 void            closefgrp(Fgrp*);
37 void            closepgrp(Pgrp*);
38 void            closergrp(Rgrp*);
39 long            clrfpintr(void);
40 void            cmderror(Cmdbuf*, char*);
41 int             cmount(Chan**, Chan*, int, char*);
42 void            confinit(void);
43 int             consactive(void);
44 void            (*consdebug)(void);
45 void            cpushutdown(void);
46 int             copen(Chan*);
47 void            cclunk(Chan*);
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);
53 void            ctrunc(Chan*);
54 void            cunmount(Chan*, Chan*);
55 void            cupdate(Chan*, uchar*, int, vlong);
56 void            cwrite(Chan*, uchar*, int, vlong);
57 uintptr         dbgpc(Proc*);
58 long            decref(Ref*);
59 int             decrypt(void*, void*, int);
60 void            delay(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*);
70 Devgen          devgen;
71 void            devinit(void);
72 int             devno(int, int);
73 Chan*           devopen(Chan*, int, Dirtab*, int, Devgen*);
74 void            devpermcheck(char*, ulong, int);
75 void            devpower(int);
76 void            devremove(Chan*);
77 void            devreset(void);
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);
82 void            drawactive(int);
83 void            drawcmap(void);
84 void            dumpaproc(Proc*);
85 void            dumpregs(Ureg*);
86 void            dumpstack(void);
87 Fgrp*           dupfgrp(Fgrp*);
88 void            dupswap(Page*);
89 void            edfinit(Proc*);
90 char*           edfadmit(Proc*);
91 int             edfready(Proc*);
92 void            edfrecord(Proc*);
93 void            edfrun(Proc*, int);
94 void            edfstop(Proc*);
95 void            edfyield(void);
96 int             emptystr(char*);
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);
101 int             eqqid(Qid, Qid);
102 void            error(char*);
103 void            eqlock(QLock*);
104 uintptr         execregs(uintptr, ulong, ulong);
105 void            exhausted(char*);
106 void            exit(int);
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);
114 void            flushmmu(void);
115 void            forceclosefgrp(void);
116 void            forkchild(Proc*, Ureg*);
117 void            forkret(void);
118 void            free(void*);
119 void            freeb(Block*);
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);
132 void            hzsched(void);
133 Block*          iallocb(int);
134 uintptr         ibrk(uintptr, int);
135 void            ilock(Lock*);
136 void            interrupted(void);
137 void            iunlock(Lock*);
138 ulong           imagecached(void);
139 ulong           imagereclaim(int);
140 long            incref(Ref*);
141 void            init0(void);
142 void            initseg(void);
143 int             ioalloc(ulong, ulong, ulong, char*);
144 void            iofree(ulong);
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*, ...);
150 void            isdir(Chan*);
151 int             iseve(void);
152 int             islo(void);
153 Segment*        isoverlap(uintptr, uintptr);
154 Physseg*        findphysseg(char*);
155 int             kenter(Ureg*);
156 void            kexit(Ureg*);
157 void            kickpager(void);
158 void            killbig(char*);
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*);
165 int             lock(Lock*);
166 void            logopen(Log*);
167 void            logclose(Log*);
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)
175 void            machinit(void);
176 void*           mallocz(ulong, int);
177 void*           malloc(ulong);
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*);
198 ulong           ms2tk(ulong);
199 ulong           msize(void*);
200 ulong           ms2tk(ulong);
201 uvlong          ms2fastticks(ulong);
202 void            mul64fract(uvlong*, uvlong, uvlong);
203 void            muxclose(Mnt*);
204 Chan*           namec(char*, int, int, ulong);
205 void            nameerror(char*, char*);
206 int             needpages(void*);
207 Chan*           newchan(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*);
213 Pgrp*           newpgrp(void);
214 Rgrp*           newrgrp(void);
215 Proc*           newproc(void);
216 void            nexterror(void);
217 int             notify(Ureg*);
218 ulong           nkpages(Confmem*);
219 uvlong          ns2fastticks(uvlong);
220 int             okaddr(uintptr, ulong, int);
221 int             openmode(ulong);
222 Block*          packblock(Block*);
223 Block*          padblock(Block*, int);
224 void            pageinit(void);
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*, ...);
237 int             preempted(void);
238 void            prflush(void);
239 void            printinit(void);
240 ulong           procalarm(ulong);
241 void            procctl(void);
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*);
251 Proc*           proctab(int);
252 extern void     (*proctrace)(Proc*, int, vlong); 
253 void            procwired(Proc*, int);
254 Pte*            ptealloc(void);
255 Pte*            ptecpy(Pte*);
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*);
262 void            putpage(Page*);
263 void            putseg(Segment*);
264 void            putstrn(char*, int);
265 void            putswap(Page*);
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*);
272 void            qclose(Queue*);
273 int             qconsume(Queue*, void*, int);
274 Block*          qcopy(Queue*, int, ulong);
275 int             qdiscard(Queue*, int);
276 void            qflush(Queue*);
277 void            qfree(Queue*);
278 int             qfull(Queue*);
279 Block*          qget(Queue*);
280 void            qhangup(Queue*, char*);
281 int             qisclosed(Queue*);
282 int             qiwrite(Queue*, void*, int);
283 int             qlen(Queue*);
284 void            qlock(QLock*);
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*);
295 int             qwindow(Queue*);
296 int             qwrite(Queue*, void*, int);
297 void            qnoblock(Queue*, int);
298 void            randominit(void);
299 ulong           randomread(void*, ulong);
300 void            ramdiskinit(void);
301 void            rdb(void);
302 long            readblist(Block*, uchar*, long, ulong);
303 int             readnum(ulong, char*, ulong, ulong, int);
304 int             readstr(ulong, char*, ulong, char*);
305 void            ready(Proc*);
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*);
311 void            resched(char*);
312 void            resrcwait(char*);
313 int             return0(void*);
314 void            rlock(RWlock*);
315 long            rtctime(void);
316 void            runlock(RWlock*);
317 Proc*           runproc(void);
318 void            savefpregs(FPsave*);
319 void            sched(void);
320 void            schedinit(void);
321 void            (*screenputs)(char*, int);
322 void*           secalloc(ulong);
323 void            secfree(void*);
324 long            seconds(void);
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);
340 int             splhi(void);
341 int             spllo(void);
342 void            splx(int);
343 void            splxpc(int);
344 char*           srvname(Chan*);
345 void            srvrenameuser(char*, char*);
346 void            shrrenameuser(char*, char*);
347 int             swapcount(uintptr);
348 int             swapfull(void);
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);
355 void            timerset(Tval);
356 ulong           tk2ms(ulong);
357 #define         TK2MS(x) ((x)*(1000/HZ))
358 uvlong          tod2fastticks(vlong);
359 vlong           todget(vlong*);
360 void            todsetfreq(vlong);
361 void            todinit(void);
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*);
367 int             uartgetc(void);
368 void            uartkick(void*);
369 void            uartmouse(char*, int (*)(Queue*, int), int);
370 void            uartsetmouseputc(char*, int (*)(Queue*, int));
371 void            uartputc(int);
372 void            uartputs(char*, int);
373 void            uartrecv(Uart*, char);
374 int             uartstageoutput(Uart*);
375 void            unbreak(Proc*);
376 void            uncachepage(Page*);
377 long            unionread(Chan*, void*, long);
378 void            unlock(Lock*);
379 uvlong          us2fastticks(uvlong);
380 void            userinit(void);
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*);
390 void            wlock(RWlock*);
391 void            wunlock(RWlock*);
392 void*           xalloc(ulong);
393 void*           xallocz(ulong, int);
394 void            xfree(void*);
395 void            xhole(uintptr, uintptr);
396 void            xinit(void);
397 int             xmerge(void*, void*);
398 void*           xspanalloc(ulong, int, ulong);
399 void            xsummary(void);
400 void            yield(void);
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*);
410 uint            nhgetl(void*);
411 ushort          nhgets(void*);
412 ulong           µs(void);
413 long            lcycles(void);
414
415 #pragma varargck argpos iprint  1
416 #pragma varargck argpos panic   1
417 #pragma varargck argpos pprint  1