2011-03-30 12:46:40 +00:00
|
|
|
void _assert(char*);
|
|
|
|
void accounttime(void);
|
|
|
|
Timer* addclock0link(void (*)(void), int);
|
2016-03-27 18:57:01 +00:00
|
|
|
Physseg* addphysseg(Physseg*);
|
2011-03-30 12:46:40 +00:00
|
|
|
void addbootfile(char*, uchar*, ulong);
|
|
|
|
void addwatchdog(Watchdog*);
|
|
|
|
Block* adjustblock(Block*, int);
|
|
|
|
void alarmkproc(void*);
|
|
|
|
Block* allocb(int);
|
|
|
|
int anyhigher(void);
|
|
|
|
int anyready(void);
|
2014-01-19 23:47:55 +00:00
|
|
|
Image* attachimage(int, Chan*, uintptr, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
int blocklen(Block*);
|
|
|
|
void bootlinks(void);
|
2014-01-19 23:47:55 +00:00
|
|
|
void cachedel(Image*, uintptr);
|
2011-03-30 12:46:40 +00:00
|
|
|
void cachepage(Page*, Image*);
|
|
|
|
void callwithureg(void(*)(Ureg*));
|
|
|
|
char* chanpath(Chan*);
|
|
|
|
int canlock(Lock*);
|
|
|
|
int canpage(Proc*);
|
|
|
|
int canqlock(QLock*);
|
|
|
|
int canrlock(RWlock*);
|
|
|
|
void chandevinit(void);
|
|
|
|
void chandevreset(void);
|
|
|
|
void chandevshutdown(void);
|
|
|
|
void chanfree(Chan*);
|
|
|
|
void checkalarms(void);
|
|
|
|
void checkb(Block*, char*);
|
|
|
|
void cinit(void);
|
|
|
|
Chan* cclone(Chan*);
|
|
|
|
void cclose(Chan*);
|
|
|
|
void ccloseq(Chan*);
|
|
|
|
void closeegrp(Egrp*);
|
|
|
|
void closefgrp(Fgrp*);
|
|
|
|
void closepgrp(Pgrp*);
|
|
|
|
void closergrp(Rgrp*);
|
|
|
|
long clrfpintr(void);
|
|
|
|
void cmderror(Cmdbuf*, char*);
|
|
|
|
int cmount(Chan**, Chan*, int, char*);
|
|
|
|
void confinit(void);
|
|
|
|
int consactive(void);
|
|
|
|
void (*consdebug)(void);
|
2015-11-30 13:56:00 +00:00
|
|
|
void cpushutdown(void);
|
kernel: make the mntcache robust against fileserver like fossil that do not change the qid.vers on wstat
introducing new ctrunc() function that invalidates any caches
for the passed in chan, invoked when handling wstat with a
specified file length or on file creation/truncation.
test program to reproduce the problem:
#include <u.h>
#include <libc.h>
#include <libsec.h>
void
main(int argc, char *argv[])
{
int fd;
Dir *d, nd;
fd = create("xxx", ORDWR, 0666);
write(fd, "1234", 4);
d = dirstat("xxx");
assert(d->length == 4);
nulldir(&nd);
nd.length = 0;
dirwstat("xxx", &nd);
d = dirstat("xxx");
assert(d->length == 0);
fd = open("xxx", OREAD);
assert(read(fd, (void*)&d, 4) == 0);
}
2017-01-12 19:13:20 +00:00
|
|
|
int copen(Chan*);
|
2015-07-26 03:43:26 +00:00
|
|
|
void cclunk(Chan*);
|
2011-03-30 12:46:40 +00:00
|
|
|
Block* concatblock(Block*);
|
|
|
|
Block* copyblock(Block*, int);
|
|
|
|
void copypage(Page*, Page*);
|
|
|
|
void countpagerefs(ulong*, int);
|
|
|
|
int cread(Chan*, uchar*, int, vlong);
|
kernel: make the mntcache robust against fileserver like fossil that do not change the qid.vers on wstat
introducing new ctrunc() function that invalidates any caches
for the passed in chan, invoked when handling wstat with a
specified file length or on file creation/truncation.
test program to reproduce the problem:
#include <u.h>
#include <libc.h>
#include <libsec.h>
void
main(int argc, char *argv[])
{
int fd;
Dir *d, nd;
fd = create("xxx", ORDWR, 0666);
write(fd, "1234", 4);
d = dirstat("xxx");
assert(d->length == 4);
nulldir(&nd);
nd.length = 0;
dirwstat("xxx", &nd);
d = dirstat("xxx");
assert(d->length == 0);
fd = open("xxx", OREAD);
assert(read(fd, (void*)&d, 4) == 0);
}
2017-01-12 19:13:20 +00:00
|
|
|
void ctrunc(Chan*);
|
2011-03-30 12:46:40 +00:00
|
|
|
void cunmount(Chan*, Chan*);
|
|
|
|
void cupdate(Chan*, uchar*, int, vlong);
|
|
|
|
void cwrite(Chan*, uchar*, int, vlong);
|
2014-01-19 23:47:55 +00:00
|
|
|
uintptr dbgpc(Proc*);
|
2011-03-30 12:46:40 +00:00
|
|
|
long decref(Ref*);
|
|
|
|
int decrypt(void*, void*, int);
|
|
|
|
void delay(int);
|
|
|
|
Proc* dequeueproc(Schedq*, Proc*);
|
|
|
|
Chan* devattach(int, char*);
|
|
|
|
Block* devbread(Chan*, long, ulong);
|
|
|
|
long devbwrite(Chan*, Block*, ulong);
|
|
|
|
Chan* devclone(Chan*);
|
|
|
|
int devconfig(int, char *, DevConf *);
|
2011-08-17 21:27:31 +00:00
|
|
|
Chan* devcreate(Chan*, char*, int, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
void devdir(Chan*, Qid, char*, vlong, char*, long, Dir*);
|
|
|
|
long devdirread(Chan*, char*, long, Dirtab*, int, Devgen*);
|
|
|
|
Devgen devgen;
|
|
|
|
void devinit(void);
|
|
|
|
int devno(int, int);
|
|
|
|
Chan* devopen(Chan*, int, Dirtab*, int, Devgen*);
|
|
|
|
void devpermcheck(char*, ulong, int);
|
|
|
|
void devpower(int);
|
|
|
|
void devremove(Chan*);
|
|
|
|
void devreset(void);
|
|
|
|
void devshutdown(void);
|
|
|
|
int devstat(Chan*, uchar*, int, Dirtab*, int, Devgen*);
|
|
|
|
Walkqid* devwalk(Chan*, Chan*, char**, int, Dirtab*, int, Devgen*);
|
|
|
|
int devwstat(Chan*, uchar*, int);
|
|
|
|
void drawactive(int);
|
|
|
|
void drawcmap(void);
|
|
|
|
void dumpaproc(Proc*);
|
|
|
|
void dumpregs(Ureg*);
|
|
|
|
void dumpstack(void);
|
|
|
|
Fgrp* dupfgrp(Fgrp*);
|
|
|
|
void dupswap(Page*);
|
|
|
|
void edfinit(Proc*);
|
|
|
|
char* edfadmit(Proc*);
|
|
|
|
int edfready(Proc*);
|
|
|
|
void edfrecord(Proc*);
|
|
|
|
void edfrun(Proc*, int);
|
|
|
|
void edfstop(Proc*);
|
|
|
|
void edfyield(void);
|
|
|
|
int emptystr(char*);
|
|
|
|
int encrypt(void*, void*, int);
|
|
|
|
void envcpy(Egrp*, Egrp*);
|
|
|
|
int eqchan(Chan*, Chan*, int);
|
|
|
|
int eqchantdqid(Chan*, int, int, Qid, int);
|
|
|
|
int eqqid(Qid, Qid);
|
|
|
|
void error(char*);
|
2011-08-10 14:21:17 +00:00
|
|
|
void eqlock(QLock*);
|
2014-01-19 23:47:55 +00:00
|
|
|
uintptr execregs(uintptr, ulong, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
void exhausted(char*);
|
|
|
|
void exit(int);
|
|
|
|
uvlong fastticks(uvlong*);
|
|
|
|
uvlong fastticks2ns(uvlong);
|
|
|
|
uvlong fastticks2us(uvlong);
|
2019-08-27 01:47:18 +00:00
|
|
|
int fault(uintptr, uintptr, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
void fdclose(int, int);
|
|
|
|
Chan* fdtochan(int, int, int, int);
|
|
|
|
int findmount(Chan**, Mhead**, int, int, Qid);
|
|
|
|
void flushmmu(void);
|
|
|
|
void forceclosefgrp(void);
|
|
|
|
void forkchild(Proc*, Ureg*);
|
|
|
|
void forkret(void);
|
|
|
|
void free(void*);
|
|
|
|
void freeb(Block*);
|
|
|
|
void freeblist(Block*);
|
|
|
|
int freebroken(void);
|
2019-05-01 08:07:39 +00:00
|
|
|
void freepages(Page*, Page*, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
void freepte(Segment*, Pte*);
|
|
|
|
void getcolor(ulong, ulong*, ulong*, ulong*);
|
2014-01-19 23:47:55 +00:00
|
|
|
uintptr getmalloctag(void*);
|
|
|
|
uintptr getrealloctag(void*);
|
2011-03-30 12:46:40 +00:00
|
|
|
void gotolabel(Label*);
|
|
|
|
char* getconfenv(void);
|
|
|
|
long hostdomainwrite(char*, int);
|
|
|
|
long hostownerwrite(char*, int);
|
2016-08-27 18:42:31 +00:00
|
|
|
void (*hwrandbuf)(void*, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
void hzsched(void);
|
|
|
|
Block* iallocb(int);
|
2015-12-21 03:49:29 +00:00
|
|
|
uintptr ibrk(uintptr, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
void ilock(Lock*);
|
2014-04-29 19:17:07 +00:00
|
|
|
void interrupted(void);
|
2011-03-30 12:46:40 +00:00
|
|
|
void iunlock(Lock*);
|
2018-01-04 23:52:14 +00:00
|
|
|
ulong imagecached(void);
|
2020-04-26 17:54:46 +00:00
|
|
|
ulong imagereclaim(int);
|
2011-03-30 12:46:40 +00:00
|
|
|
long incref(Ref*);
|
2020-01-26 18:01:36 +00:00
|
|
|
void init0(void);
|
2011-03-30 12:46:40 +00:00
|
|
|
void initseg(void);
|
2020-11-03 19:46:09 +00:00
|
|
|
int ioalloc(ulong, ulong, ulong, char*);
|
|
|
|
void iofree(ulong);
|
|
|
|
void iomapinit(ulong);
|
|
|
|
int ioreserve(ulong, ulong, ulong, char*);
|
|
|
|
int ioreservewin(ulong, ulong, ulong, ulong, char*);
|
|
|
|
int iounused(ulong, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
int iprint(char*, ...);
|
|
|
|
void isdir(Chan*);
|
|
|
|
int iseve(void);
|
|
|
|
int islo(void);
|
2016-03-30 20:49:13 +00:00
|
|
|
Segment* isoverlap(uintptr, uintptr);
|
2016-03-27 18:57:01 +00:00
|
|
|
Physseg* findphysseg(char*);
|
2020-12-20 21:34:41 +00:00
|
|
|
int kenter(Ureg*);
|
|
|
|
void kexit(Ureg*);
|
2011-03-30 12:46:40 +00:00
|
|
|
void kickpager(void);
|
|
|
|
void killbig(char*);
|
|
|
|
void kproc(char*, void(*)(void*), void*);
|
2020-12-20 21:34:41 +00:00
|
|
|
void kprocchild(Proc*, void (*)(void));
|
2014-01-19 23:47:55 +00:00
|
|
|
void (*kproftimer)(uintptr);
|
2011-03-30 12:46:40 +00:00
|
|
|
void ksetenv(char*, char*, int);
|
|
|
|
void kstrcpy(char*, char*, int);
|
|
|
|
void kstrdup(char**, char*);
|
|
|
|
int lock(Lock*);
|
|
|
|
void logopen(Log*);
|
|
|
|
void logclose(Log*);
|
|
|
|
char* logctl(Log*, int, char**, Logflag*);
|
|
|
|
void logn(Log*, int, void*, int);
|
|
|
|
long logread(Log*, void*, ulong, long);
|
|
|
|
void log(Log*, int, char*, ...);
|
|
|
|
Cmdtab* lookupcmd(Cmdbuf*, Cmdtab*, int);
|
2014-01-19 23:47:55 +00:00
|
|
|
Page* lookpage(Image*, uintptr);
|
2011-03-30 12:46:40 +00:00
|
|
|
#define MS2NS(n) (((vlong)(n))*1000000LL)
|
|
|
|
void machinit(void);
|
|
|
|
void* mallocz(ulong, int);
|
|
|
|
void* malloc(ulong);
|
|
|
|
void* mallocalign(ulong, ulong, long, ulong);
|
|
|
|
void mallocsummary(void);
|
2020-04-04 14:04:27 +00:00
|
|
|
void memmapdump(void);
|
|
|
|
uvlong memmapnext(uvlong, ulong);
|
|
|
|
uvlong memmapsize(uvlong, uvlong);
|
|
|
|
void memmapadd(uvlong, uvlong, ulong);
|
|
|
|
uvlong memmapalloc(uvlong, uvlong, uvlong, ulong);
|
|
|
|
void memmapfree(uvlong, uvlong, ulong);
|
2014-07-14 04:02:21 +00:00
|
|
|
ulong mcountseg(Segment*);
|
2015-03-07 17:59:06 +00:00
|
|
|
void mfreeseg(Segment*, uintptr, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
void microdelay(int);
|
|
|
|
uvlong mk64fract(uvlong, uvlong);
|
|
|
|
void mkqid(Qid*, vlong, ulong, int);
|
|
|
|
void mmurelease(Proc*);
|
|
|
|
void mmuswitch(Proc*);
|
2015-07-28 07:52:21 +00:00
|
|
|
Chan* mntattach(Chan*, Chan*, char*, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
Chan* mntauth(Chan*, char*);
|
2016-03-10 02:02:28 +00:00
|
|
|
int mntversion(Chan*, char*, int, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
void mouseresize(void);
|
|
|
|
void mountfree(Mount*);
|
|
|
|
ulong ms2tk(ulong);
|
|
|
|
ulong msize(void*);
|
|
|
|
ulong ms2tk(ulong);
|
|
|
|
uvlong ms2fastticks(ulong);
|
|
|
|
void mul64fract(uvlong*, uvlong, uvlong);
|
|
|
|
void muxclose(Mnt*);
|
|
|
|
Chan* namec(char*, int, int, ulong);
|
|
|
|
void nameerror(char*, char*);
|
2015-03-16 04:46:08 +00:00
|
|
|
int needpages(void*);
|
2011-03-30 12:46:40 +00:00
|
|
|
Chan* newchan(void);
|
kernel: implement per file descriptor OCEXEC flag, reject ORCLOSE when opening /fd, /srv and /shr
The OCEXEC flag used to be maintained per channel,
making it shared between all the file desciptors.
This has a unexpected side effects with regard to
channel passing drivers such as devdup (/fd),
devsrv (/srv) and devshr (/shr).
For example, opening a /srv file with OCEXEC
makes it impossible to be remounted by exportfs
as it internally does a exec() to mount and
re-export it. There is no way to reset the flag.
This change makes the OCEXEC flag per file descriptor,
so a open with the OCEXEC flag only affects the fd
group of the calling process, and not the channel
itself.
On rfork(RFFDG), the per file descriptor flags get
copied.
On dup(), the per file descriptor flags are reset.
The second modification is that /fd, /srv and /shr
should reject the ORCLOSE flag, as the files that
are returned have already been opend.
2020-12-13 15:04:09 +00:00
|
|
|
int newfd(Chan*, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
Mhead* newmhead(Chan*);
|
2015-08-09 19:16:10 +00:00
|
|
|
Mount* newmount(Chan*, int, char*);
|
2014-01-19 23:47:55 +00:00
|
|
|
Page* newpage(int, Segment **, uintptr);
|
2011-03-30 12:46:40 +00:00
|
|
|
Path* newpath(char*);
|
|
|
|
Pgrp* newpgrp(void);
|
|
|
|
Rgrp* newrgrp(void);
|
|
|
|
Proc* newproc(void);
|
|
|
|
void nexterror(void);
|
|
|
|
int notify(Ureg*);
|
|
|
|
uvlong ns2fastticks(uvlong);
|
2014-01-19 23:47:55 +00:00
|
|
|
int okaddr(uintptr, ulong, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
int openmode(ulong);
|
|
|
|
Block* packblock(Block*);
|
|
|
|
Block* padblock(Block*, int);
|
|
|
|
void pageinit(void);
|
2020-04-26 17:54:46 +00:00
|
|
|
ulong pagereclaim(Image*);
|
2011-03-30 12:46:40 +00:00
|
|
|
void panic(char*, ...);
|
|
|
|
Cmdbuf* parsecmd(char *a, int n);
|
|
|
|
void pathclose(Path*);
|
|
|
|
ulong perfticks(void);
|
|
|
|
void pexit(char*, int);
|
|
|
|
void pgrpcpy(Pgrp*, Pgrp*);
|
2020-02-23 17:00:21 +00:00
|
|
|
ulong pidalloc(Proc*);
|
2011-03-30 12:46:40 +00:00
|
|
|
#define poperror() up->nerrlab--
|
|
|
|
void portcountpagerefs(ulong*, int);
|
|
|
|
int postnote(Proc*, int, char*, int);
|
|
|
|
int pprint(char*, ...);
|
|
|
|
int preempted(void);
|
|
|
|
void prflush(void);
|
|
|
|
void printinit(void);
|
|
|
|
ulong procalarm(ulong);
|
2014-11-09 07:19:28 +00:00
|
|
|
void procctl(void);
|
2014-12-21 03:46:22 +00:00
|
|
|
int procfdprint(Chan*, int, char*, int);
|
2014-08-16 22:50:20 +00:00
|
|
|
void procflushseg(Segment*);
|
2016-03-27 18:57:01 +00:00
|
|
|
void procflushpseg(Physseg*);
|
2019-12-07 01:19:14 +00:00
|
|
|
void procflushothers(void);
|
2011-03-30 12:46:40 +00:00
|
|
|
int procindex(ulong);
|
|
|
|
void procinit0(void);
|
2014-08-16 22:50:20 +00:00
|
|
|
ulong procpagecount(Proc*);
|
2011-03-30 12:46:40 +00:00
|
|
|
void procpriority(Proc*, int, int);
|
2020-12-19 17:07:12 +00:00
|
|
|
void procsetuser(char*);
|
2011-03-30 12:46:40 +00:00
|
|
|
Proc* proctab(int);
|
|
|
|
extern void (*proctrace)(Proc*, int, vlong);
|
|
|
|
void procwired(Proc*, int);
|
|
|
|
Pte* ptealloc(void);
|
|
|
|
Pte* ptecpy(Pte*);
|
|
|
|
int pullblock(Block**, int);
|
|
|
|
Block* pullupblock(Block*, int);
|
|
|
|
Block* pullupqueue(Queue*, int);
|
|
|
|
void putimage(Image*);
|
|
|
|
void putmhead(Mhead*);
|
2014-01-20 02:17:55 +00:00
|
|
|
void putmmu(uintptr, uintptr, Page*);
|
2011-03-30 12:46:40 +00:00
|
|
|
void putpage(Page*);
|
|
|
|
void putseg(Segment*);
|
|
|
|
void putstrn(char*, int);
|
|
|
|
void putswap(Page*);
|
|
|
|
ulong pwait(Waitmsg*);
|
2016-11-07 21:20:10 +00:00
|
|
|
int qaddlist(Queue*, Block*);
|
2011-03-30 12:46:40 +00:00
|
|
|
Block* qbread(Queue*, int);
|
|
|
|
long qbwrite(Queue*, Block*);
|
|
|
|
Queue* qbypass(void (*)(void*, Block*), void*);
|
|
|
|
int qcanread(Queue*);
|
|
|
|
void qclose(Queue*);
|
|
|
|
int qconsume(Queue*, void*, int);
|
|
|
|
Block* qcopy(Queue*, int, ulong);
|
|
|
|
int qdiscard(Queue*, int);
|
|
|
|
void qflush(Queue*);
|
|
|
|
void qfree(Queue*);
|
|
|
|
int qfull(Queue*);
|
|
|
|
Block* qget(Queue*);
|
|
|
|
void qhangup(Queue*, char*);
|
|
|
|
int qisclosed(Queue*);
|
|
|
|
int qiwrite(Queue*, void*, int);
|
|
|
|
int qlen(Queue*);
|
|
|
|
void qlock(QLock*);
|
|
|
|
Queue* qopen(int, int, void (*)(void*), void*);
|
|
|
|
int qpass(Queue*, Block*);
|
|
|
|
int qpassnolim(Queue*, Block*);
|
|
|
|
int qproduce(Queue*, void*, int);
|
|
|
|
void qputback(Queue*, Block*);
|
|
|
|
long qread(Queue*, void*, int);
|
|
|
|
Block* qremove(Queue*);
|
|
|
|
void qreopen(Queue*);
|
|
|
|
void qsetlimit(Queue*, int);
|
|
|
|
void qunlock(QLock*);
|
|
|
|
int qwindow(Queue*);
|
|
|
|
int qwrite(Queue*, void*, int);
|
|
|
|
void qnoblock(Queue*, int);
|
|
|
|
void randominit(void);
|
|
|
|
ulong randomread(void*, ulong);
|
2018-05-27 20:59:19 +00:00
|
|
|
void ramdiskinit(void);
|
2011-03-30 12:46:40 +00:00
|
|
|
void rdb(void);
|
2016-11-12 16:41:58 +00:00
|
|
|
long readblist(Block*, uchar*, long, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
int readnum(ulong, char*, ulong, ulong, int);
|
|
|
|
int readstr(ulong, char*, ulong, char*);
|
|
|
|
void ready(Proc*);
|
|
|
|
void* realloc(void *v, ulong size);
|
|
|
|
void rebootcmd(int, char**);
|
|
|
|
void reboot(void*, void*, ulong);
|
2014-01-19 23:47:55 +00:00
|
|
|
void relocateseg(Segment*, uintptr);
|
2011-03-30 12:46:40 +00:00
|
|
|
void renameuser(char*, char*);
|
|
|
|
void resched(char*);
|
|
|
|
void resrcwait(char*);
|
|
|
|
int return0(void*);
|
|
|
|
void rlock(RWlock*);
|
|
|
|
long rtctime(void);
|
|
|
|
void runlock(RWlock*);
|
|
|
|
Proc* runproc(void);
|
|
|
|
void savefpregs(FPsave*);
|
|
|
|
void sched(void);
|
|
|
|
void schedinit(void);
|
|
|
|
void (*screenputs)(char*, int);
|
2016-08-27 18:33:03 +00:00
|
|
|
void* secalloc(ulong);
|
|
|
|
void secfree(void*);
|
2011-03-30 12:46:40 +00:00
|
|
|
long seconds(void);
|
2016-03-30 20:49:13 +00:00
|
|
|
uintptr segattach(int, char *, uintptr, uintptr);
|
2014-01-19 23:47:55 +00:00
|
|
|
void segclock(uintptr);
|
2015-04-15 22:45:25 +00:00
|
|
|
long segio(Segio*, Segment*, void*, long, vlong, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
void segpage(Segment*, Page*);
|
|
|
|
int setcolor(ulong, ulong, ulong, ulong);
|
|
|
|
void setkernur(Ureg*, Proc*);
|
|
|
|
int setlabel(Label*);
|
2014-01-19 23:47:55 +00:00
|
|
|
void setmalloctag(void*, uintptr);
|
2020-02-23 17:00:21 +00:00
|
|
|
ulong setnoteid(Proc*, ulong);
|
2014-01-19 23:47:55 +00:00
|
|
|
void setrealloctag(void*, uintptr);
|
2011-03-30 12:46:40 +00:00
|
|
|
void setregisters(Ureg*, char*, char*, int);
|
2017-06-12 19:03:07 +00:00
|
|
|
void setupwatchpts(Proc*, Watchpt*, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
char* skipslash(char*);
|
|
|
|
void sleep(Rendez*, int(*)(void*), void*);
|
|
|
|
void* smalloc(ulong);
|
|
|
|
int splhi(void);
|
|
|
|
int spllo(void);
|
|
|
|
void splx(int);
|
|
|
|
void splxpc(int);
|
|
|
|
char* srvname(Chan*);
|
2011-05-09 08:32:14 +00:00
|
|
|
void srvrenameuser(char*, char*);
|
2011-07-28 12:22:39 +00:00
|
|
|
void shrrenameuser(char*, char*);
|
2014-01-19 23:47:55 +00:00
|
|
|
int swapcount(uintptr);
|
2011-03-30 12:46:40 +00:00
|
|
|
int swapfull(void);
|
2014-01-19 23:47:55 +00:00
|
|
|
void syscallfmt(ulong syscallno, uintptr pc, va_list list);
|
|
|
|
void sysretfmt(ulong syscallno, va_list list, uintptr ret, uvlong start, uvlong stop);
|
2011-03-30 12:46:40 +00:00
|
|
|
void timeradd(Timer*);
|
|
|
|
void timerdel(Timer*);
|
|
|
|
void timersinit(void);
|
|
|
|
void timerintr(Ureg*, Tval);
|
|
|
|
void timerset(Tval);
|
|
|
|
ulong tk2ms(ulong);
|
|
|
|
#define TK2MS(x) ((x)*(1000/HZ))
|
|
|
|
uvlong tod2fastticks(vlong);
|
|
|
|
vlong todget(vlong*);
|
|
|
|
void todsetfreq(vlong);
|
|
|
|
void todinit(void);
|
|
|
|
void todset(vlong, vlong, int);
|
|
|
|
Block* trimblock(Block*, int, int);
|
|
|
|
void tsleep(Rendez*, int (*)(void*), void*, ulong);
|
2017-03-28 22:30:53 +00:00
|
|
|
void twakeup(Ureg*, Timer *);
|
2011-03-30 12:46:40 +00:00
|
|
|
int uartctl(Uart*, char*);
|
|
|
|
int uartgetc(void);
|
|
|
|
void uartkick(void*);
|
2013-01-13 09:23:31 +00:00
|
|
|
void uartmouse(char*, int (*)(Queue*, int), int);
|
|
|
|
void uartsetmouseputc(char*, int (*)(Queue*, int));
|
2011-03-30 12:46:40 +00:00
|
|
|
void uartputc(int);
|
|
|
|
void uartputs(char*, int);
|
|
|
|
void uartrecv(Uart*, char);
|
|
|
|
int uartstageoutput(Uart*);
|
|
|
|
void unbreak(Proc*);
|
|
|
|
void uncachepage(Page*);
|
|
|
|
long unionread(Chan*, void*, long);
|
|
|
|
void unlock(Lock*);
|
|
|
|
uvlong us2fastticks(uvlong);
|
|
|
|
void userinit(void);
|
2014-01-19 23:47:55 +00:00
|
|
|
uintptr userpc(void);
|
2011-03-30 12:46:40 +00:00
|
|
|
long userwrite(char*, int);
|
2014-01-19 23:47:55 +00:00
|
|
|
void validaddr(uintptr, ulong, int);
|
2011-03-30 12:46:40 +00:00
|
|
|
void validname(char*, int);
|
|
|
|
char* validnamedup(char*, int);
|
|
|
|
void validstat(uchar*, int);
|
2015-08-06 08:15:07 +00:00
|
|
|
void* vmemchr(void*, int, ulong);
|
2011-03-30 12:46:40 +00:00
|
|
|
Proc* wakeup(Rendez*);
|
|
|
|
int walk(Chan**, char**, int, int, int*);
|
|
|
|
void wlock(RWlock*);
|
|
|
|
void wunlock(RWlock*);
|
|
|
|
void* xalloc(ulong);
|
|
|
|
void* xallocz(ulong, int);
|
|
|
|
void xfree(void*);
|
2014-01-21 21:12:25 +00:00
|
|
|
void xhole(uintptr, uintptr);
|
2011-03-30 12:46:40 +00:00
|
|
|
void xinit(void);
|
|
|
|
int xmerge(void*, void*);
|
|
|
|
void* xspanalloc(ulong, int, ulong);
|
|
|
|
void xsummary(void);
|
|
|
|
void yield(void);
|
|
|
|
Segment* data2txt(Segment*);
|
|
|
|
Segment* dupseg(Segment**, int, int);
|
2014-01-19 23:47:55 +00:00
|
|
|
Segment* newseg(int, uintptr, ulong);
|
|
|
|
Segment* seg(Proc*, uintptr, int);
|
2014-07-14 04:02:21 +00:00
|
|
|
Segment* txt2data(Segment*);
|
2011-03-30 12:46:40 +00:00
|
|
|
void hnputv(void*, uvlong);
|
|
|
|
void hnputl(void*, uint);
|
|
|
|
void hnputs(void*, ushort);
|
|
|
|
uvlong nhgetv(void*);
|
|
|
|
uint nhgetl(void*);
|
|
|
|
ushort nhgets(void*);
|
|
|
|
ulong µs(void);
|
|
|
|
long lcycles(void);
|
|
|
|
|
|
|
|
#pragma varargck argpos iprint 1
|
|
|
|
#pragma varargck argpos panic 1
|
|
|
|
#pragma varargck argpos pprint 1
|