]> git.lizzy.rs Git - plan9front.git/blob - sys/src/9/port/portfns.h
pc kernel: fix wrong simd exception mask (fixes go bootstrap)
[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 int             blocklen(Block*);
14 void            bootlinks(void);
15 void            cachedel(Image*, uintptr);
16 void            cachepage(Page*, Image*);
17 void            callwithureg(void(*)(Ureg*));
18 char*           chanpath(Chan*);
19 int             canlock(Lock*);
20 int             canpage(Proc*);
21 int             canqlock(QLock*);
22 int             canrlock(RWlock*);
23 void            chandevinit(void);
24 void            chandevreset(void);
25 void            chandevshutdown(void);
26 void            chanfree(Chan*);
27 void            checkalarms(void);
28 void            checkb(Block*, char*);
29 void            cinit(void);
30 Chan*           cclone(Chan*);
31 void            cclose(Chan*);
32 void            ccloseq(Chan*);
33 void            closeegrp(Egrp*);
34 void            closefgrp(Fgrp*);
35 void            closepgrp(Pgrp*);
36 void            closergrp(Rgrp*);
37 long            clrfpintr(void);
38 void            cmderror(Cmdbuf*, char*);
39 int             cmount(Chan**, Chan*, int, char*);
40 void            confinit(void);
41 int             consactive(void);
42 void            (*consdebug)(void);
43 void            cpushutdown(void);
44 int             copen(Chan*);
45 void            cclunk(Chan*);
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            ctrunc(Chan*);
52 void            cunmount(Chan*, Chan*);
53 void            cupdate(Chan*, uchar*, int, vlong);
54 void            cwrite(Chan*, uchar*, int, vlong);
55 uintptr         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 Chan*           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 void            dupswap(Page*);
87 void            edfinit(Proc*);
88 char*           edfadmit(Proc*);
89 int             edfready(Proc*);
90 void            edfrecord(Proc*);
91 void            edfrun(Proc*, int);
92 void            edfstop(Proc*);
93 void            edfyield(void);
94 int             emptystr(char*);
95 int             encrypt(void*, void*, int);
96 void            envcpy(Egrp*, Egrp*);
97 int             eqchan(Chan*, Chan*, int);
98 int             eqchantdqid(Chan*, int, int, Qid, int);
99 int             eqqid(Qid, Qid);
100 void            error(char*);
101 void            eqlock(QLock*);
102 uintptr         execregs(uintptr, 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(uintptr, 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*, uintptr, 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 uintptr         getmalloctag(void*);
124 uintptr         getrealloctag(void*);
125 void            gotolabel(Label*);
126 char*           getconfenv(void);
127 long            hostdomainwrite(char*, int);
128 long            hostownerwrite(char*, int);
129 void            (*hwrandbuf)(void*, ulong);
130 void            hzsched(void);
131 Block*          iallocb(int);
132 uintptr         ibrk(uintptr, int);
133 void            ilock(Lock*);
134 void            interrupted(void);
135 void            iunlock(Lock*);
136 ulong           imagereclaim(ulong);
137 long            incref(Ref*);
138 void            initseg(void);
139 int             iprint(char*, ...);
140 void            isdir(Chan*);
141 int             iseve(void);
142 int             islo(void);
143 Segment*        isoverlap(uintptr, uintptr);
144 Physseg*        findphysseg(char*);
145 void            kickpager(void);
146 void            killbig(char*);
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*);
153 int             lock(Lock*);
154 void            logopen(Log*);
155 void            logclose(Log*);
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)
163 void            machinit(void);
164 void*           mallocz(ulong, int);
165 void*           malloc(ulong);
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, ulong);
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*           mntattach(Chan*, Chan*, char*, int);
177 Chan*           mntauth(Chan*, char*);
178 int             mntversion(Chan*, char*, int, int);
179 void            mouseresize(void);
180 void            mountfree(Mount*);
181 ulong           ms2tk(ulong);
182 ulong           msize(void*);
183 ulong           ms2tk(ulong);
184 uvlong          ms2fastticks(ulong);
185 void            mul64fract(uvlong*, uvlong, uvlong);
186 void            muxclose(Mnt*);
187 Chan*           namec(char*, int, int, ulong);
188 void            nameerror(char*, char*);
189 int             needpages(void*);
190 Chan*           newchan(void);
191 int             newfd(Chan*);
192 Mhead*          newmhead(Chan*);
193 Mount*          newmount(Chan*, int, char*);
194 Page*           newpage(int, Segment **, uintptr);
195 Path*           newpath(char*);
196 Pgrp*           newpgrp(void);
197 Rgrp*           newrgrp(void);
198 Proc*           newproc(void);
199 void            nexterror(void);
200 int             notify(Ureg*);
201 uvlong          ns2fastticks(uvlong);
202 int             okaddr(uintptr, ulong, int);
203 int             openmode(ulong);
204 Block*          packblock(Block*);
205 Block*          padblock(Block*, int);
206 void            pagechaindone(void);
207 void            pagechainhead(Page*);
208 void            pageinit(void);
209 ulong           pagenumber(Page*);
210 ulong           pagereclaim(Image*, ulong);
211 void            pagersummary(void);
212 void            panic(char*, ...);
213 Cmdbuf*         parsecmd(char *a, int n);
214 void            pathclose(Path*);
215 ulong           perfticks(void);
216 void            pexit(char*, int);
217 void            pgrpcpy(Pgrp*, Pgrp*);
218 void            pgrpnote(ulong, char*, long, int);
219 int             pidalloc(Proc*);
220 #define         poperror()              up->nerrlab--
221 void            portcountpagerefs(ulong*, int);
222 int             postnote(Proc*, int, char*, int);
223 int             pprint(char*, ...);
224 int             preempted(void);
225 void            prflush(void);
226 void            printinit(void);
227 ulong           procalarm(ulong);
228 void            procctl(void);
229 void            procdump(void);
230 int             procfdprint(Chan*, int, char*, int);
231 void            procflushseg(Segment*);
232 void            procflushpseg(Physseg*);
233 int             procindex(ulong);
234 void            procinit0(void);
235 ulong           procpagecount(Proc*);
236 void            procpriority(Proc*, int, int);
237 Proc*           proctab(int);
238 extern void     (*proctrace)(Proc*, int, vlong); 
239 void            procwired(Proc*, int);
240 Pte*            ptealloc(void);
241 Pte*            ptecpy(Pte*);
242 int             pullblock(Block**, int);
243 Block*          pullupblock(Block*, int);
244 Block*          pullupqueue(Queue*, int);
245 void            putimage(Image*);
246 void            putmhead(Mhead*);
247 void            putmmu(uintptr, uintptr, Page*);
248 void            putpage(Page*);
249 void            putseg(Segment*);
250 void            putstrn(char*, int);
251 void            putswap(Page*);
252 ulong           pwait(Waitmsg*);
253 int             qaddlist(Queue*, Block*);
254 Block*          qbread(Queue*, int);
255 long            qbwrite(Queue*, Block*);
256 Queue*          qbypass(void (*)(void*, Block*), void*);
257 int             qcanread(Queue*);
258 void            qclose(Queue*);
259 int             qconsume(Queue*, void*, int);
260 Block*          qcopy(Queue*, int, ulong);
261 int             qdiscard(Queue*, int);
262 void            qflush(Queue*);
263 void            qfree(Queue*);
264 int             qfull(Queue*);
265 Block*          qget(Queue*);
266 void            qhangup(Queue*, char*);
267 int             qisclosed(Queue*);
268 int             qiwrite(Queue*, void*, int);
269 int             qlen(Queue*);
270 void            qlock(QLock*);
271 Queue*          qopen(int, int, void (*)(void*), void*);
272 int             qpass(Queue*, Block*);
273 int             qpassnolim(Queue*, Block*);
274 int             qproduce(Queue*, void*, int);
275 void            qputback(Queue*, Block*);
276 long            qread(Queue*, void*, int);
277 Block*          qremove(Queue*);
278 void            qreopen(Queue*);
279 void            qsetlimit(Queue*, int);
280 void            qunlock(QLock*);
281 int             qwindow(Queue*);
282 int             qwrite(Queue*, void*, int);
283 void            qnoblock(Queue*, int);
284 void            randominit(void);
285 ulong           randomread(void*, ulong);
286 void            rdb(void);
287 long            readblist(Block*, uchar*, long, ulong);
288 int             readnum(ulong, char*, ulong, ulong, int);
289 int             readstr(ulong, char*, ulong, char*);
290 void            ready(Proc*);
291 void*           realloc(void *v, ulong size);
292 void            rebootcmd(int, char**);
293 void            reboot(void*, void*, ulong);
294 void            relocateseg(Segment*, uintptr);
295 void            renameuser(char*, char*);
296 void            resched(char*);
297 void            resrcwait(char*);
298 int             return0(void*);
299 void            rlock(RWlock*);
300 long            rtctime(void);
301 void            runlock(RWlock*);
302 Proc*           runproc(void);
303 void            savefpregs(FPsave*);
304 void            sched(void);
305 void            scheddump(void);
306 void            schedinit(void);
307 void            (*screenputs)(char*, int);
308 void*           secalloc(ulong);
309 void            secfree(void*);
310 long            seconds(void);
311 uintptr         segattach(int, char *, uintptr, uintptr);
312 void            segclock(uintptr);
313 long            segio(Segio*, Segment*, void*, long, vlong, int);
314 void            segpage(Segment*, Page*);
315 int             setcolor(ulong, ulong, ulong, ulong);
316 void            setkernur(Ureg*, Proc*);
317 int             setlabel(Label*);
318 void            setmalloctag(void*, uintptr);
319 void            setrealloctag(void*, uintptr);
320 void            setregisters(Ureg*, char*, char*, int);
321 void            setupwatchpts(Proc*, Watchpt*, int);
322 char*           skipslash(char*);
323 void            sleep(Rendez*, int(*)(void*), void*);
324 void*           smalloc(ulong);
325 int             splhi(void);
326 int             spllo(void);
327 void            splx(int);
328 void            splxpc(int);
329 char*           srvname(Chan*);
330 void            srvrenameuser(char*, char*);
331 void            shrrenameuser(char*, char*);
332 int             swapcount(uintptr);
333 int             swapfull(void);
334 void            syscallfmt(ulong syscallno, uintptr pc, va_list list);
335 void            sysretfmt(ulong syscallno, va_list list, uintptr ret, uvlong start, uvlong stop);
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 void            twakeup(Ureg*, Timer *);
351 int             uartctl(Uart*, char*);
352 int             uartgetc(void);
353 void            uartkick(void*);
354 void            uartmouse(char*, int (*)(Queue*, int), int);
355 void            uartsetmouseputc(char*, int (*)(Queue*, int));
356 void            uartputc(int);
357 void            uartputs(char*, int);
358 void            uartrecv(Uart*, char);
359 int             uartstageoutput(Uart*);
360 void            unbreak(Proc*);
361 void            uncachepage(Page*);
362 long            unionread(Chan*, void*, long);
363 void            unlock(Lock*);
364 uvlong          us2fastticks(uvlong);
365 void            userinit(void);
366 uintptr         userpc(void);
367 long            userwrite(char*, int);
368 void            validaddr(uintptr, ulong, int);
369 void            validname(char*, int);
370 char*           validnamedup(char*, int);
371 void            validstat(uchar*, int);
372 void*           vmemchr(void*, int, ulong);
373 Proc*           wakeup(Rendez*);
374 int             walk(Chan**, char**, int, int, int*);
375 void            wlock(RWlock*);
376 void            wunlock(RWlock*);
377 void*           xalloc(ulong);
378 void*           xallocz(ulong, int);
379 void            xfree(void*);
380 void            xhole(uintptr, uintptr);
381 void            xinit(void);
382 int             xmerge(void*, void*);
383 void*           xspanalloc(ulong, int, ulong);
384 void            xsummary(void);
385 void            yield(void);
386 Segment*        data2txt(Segment*);
387 Segment*        dupseg(Segment**, int, int);
388 Segment*        newseg(int, uintptr, ulong);
389 Segment*        seg(Proc*, uintptr, int);
390 Segment*        txt2data(Segment*);
391 void            hnputv(void*, uvlong);
392 void            hnputl(void*, uint);
393 void            hnputs(void*, ushort);
394 uvlong          nhgetv(void*);
395 uint            nhgetl(void*);
396 ushort          nhgets(void*);
397 ulong           µs(void);
398 long            lcycles(void);
399
400 #pragma varargck argpos iprint  1
401 #pragma varargck argpos panic   1
402 #pragma varargck argpos pprint  1