summaryrefslogtreecommitdiff
path: root/sys/src/9/port/portfns.h
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-01-20 00:47:55 +0100
committercinap_lenrek <cinap_lenrek@felloff.net>2014-01-20 00:47:55 +0100
commit6c2e983d328874ea41cb35bacb510bf2709a229f (patch)
treee2a5c596a3fcd1af3ed792494b78f2d503911b44 /sys/src/9/port/portfns.h
parentb99ecee6cd8c7c9fce1ff2cfa56d5a6807a0fc7c (diff)
kernel: apply uintptr for ulong when a pointer is stored
this change is in preparation for amd64. the systab calling convention was also changed to return uintptr (as segattach returns a pointer) and the arguments are now passed as va_list which handles amd64 arguments properly (all arguments are passed in 64bit quantities on the stack, tho the upper part will not be initialized when the element is smaller than 8 bytes). this is partial. xalloc needs to be converted in the future.
Diffstat (limited to 'sys/src/9/port/portfns.h')
-rw-r--r--sys/src/9/port/portfns.h56
1 files changed, 28 insertions, 28 deletions
diff --git a/sys/src/9/port/portfns.h b/sys/src/9/port/portfns.h
index 6b27eaf2c..3cfad6b54 100644
--- a/sys/src/9/port/portfns.h
+++ b/sys/src/9/port/portfns.h
@@ -9,12 +9,12 @@ void alarmkproc(void*);
Block* allocb(int);
int anyhigher(void);
int anyready(void);
-Image* attachimage(int, Chan*, ulong, ulong);
+Image* attachimage(int, Chan*, uintptr, ulong);
Page* auxpage(void);
Block* bl2mem(uchar*, Block*, int);
int blocklen(Block*);
void bootlinks(void);
-void cachedel(Image*, ulong);
+void cachedel(Image*, uintptr);
void cachepage(Page*, Image*);
void callwithureg(void(*)(Ureg*));
char* chanpath(Chan*);
@@ -51,7 +51,7 @@ int cread(Chan*, uchar*, int, vlong);
void cunmount(Chan*, Chan*);
void cupdate(Chan*, uchar*, int, vlong);
void cwrite(Chan*, uchar*, int, vlong);
-ulong dbgpc(Proc*);
+uintptr dbgpc(Proc*);
long decref(Ref*);
int decrypt(void*, void*, int);
void delay(int);
@@ -99,17 +99,17 @@ int eqchantdqid(Chan*, int, int, Qid, int);
int eqqid(Qid, Qid);
void error(char*);
void eqlock(QLock*);
-long execregs(ulong, ulong, ulong);
+uintptr execregs(uintptr, ulong, ulong);
void exhausted(char*);
void exit(int);
uvlong fastticks(uvlong*);
uvlong fastticks2ns(uvlong);
uvlong fastticks2us(uvlong);
-int fault(ulong, int);
+int fault(uintptr, int);
void fdclose(int, int);
Chan* fdtochan(int, int, int, int);
int findmount(Chan**, Mhead**, int, int, Qid);
-int fixfault(Segment*, ulong, int, int);
+int fixfault(Segment*, uintptr, int, int);
void flushmmu(void);
void forceclosefgrp(void);
void forkchild(Proc*, Ureg*);
@@ -120,8 +120,8 @@ void freeblist(Block*);
int freebroken(void);
void freepte(Segment*, Pte*);
void getcolor(ulong, ulong*, ulong*, ulong*);
-ulong getmalloctag(void*);
-ulong getrealloctag(void*);
+uintptr getmalloctag(void*);
+uintptr getrealloctag(void*);
void gotolabel(Label*);
char* getconfenv(void);
long hostdomainwrite(char*, int);
@@ -129,7 +129,7 @@ long hostownerwrite(char*, int);
void hzsched(void);
Block* iallocb(int);
void iallocsummary(void);
-long ibrk(ulong, int);
+long ibrk(uintptr, int);
void ilock(Lock*);
void iunlock(Lock*);
long incref(Ref*);
@@ -138,7 +138,7 @@ int iprint(char*, ...);
void isdir(Chan*);
int iseve(void);
int islo(void);
-Segment* isoverlap(Proc*, ulong, int);
+Segment* isoverlap(Proc*, uintptr, int);
int ispages(void*);
int isphysseg(char*);
void ixsummary(void);
@@ -146,7 +146,7 @@ void kickpager(void);
void killbig(char*);
void kproc(char*, void(*)(void*), void*);
void kprocchild(Proc*, void (*)(void*), void*);
-void (*kproftimer)(ulong);
+void (*kproftimer)(uintptr);
void ksetenv(char*, char*, int);
void kstrcpy(char*, char*, int);
void kstrdup(char**, char*);
@@ -158,7 +158,7 @@ void logn(Log*, int, void*, int);
long logread(Log*, void*, ulong, long);
void log(Log*, int, char*, ...);
Cmdtab* lookupcmd(Cmdbuf*, Cmdtab*, int);
-Page* lookpage(Image*, ulong);
+Page* lookpage(Image*, uintptr);
#define MS2NS(n) (((vlong)(n))*1000000LL)
void machinit(void);
void* mallocz(ulong, int);
@@ -167,7 +167,7 @@ void* mallocalign(ulong, ulong, long, ulong);
void mallocsummary(void);
Block* mem2bl(uchar*, int);
int mcountseg(Segment*);
-void mfreeseg(Segment*, ulong, int);
+void mfreeseg(Segment*, uintptr, int);
void microdelay(int);
uvlong mk64fract(uvlong, uvlong);
void mkqid(Qid*, vlong, ulong, int);
@@ -189,7 +189,7 @@ Chan* newchan(void);
int newfd(Chan*);
Mhead* newmhead(Chan*);
Mount* newmount(Mhead*, Chan*, int, char*);
-Page* newpage(int, Segment **, ulong);
+Page* newpage(int, Segment **, uintptr);
Path* newpath(char*);
Pgrp* newpgrp(void);
Rgrp* newrgrp(void);
@@ -198,7 +198,7 @@ void nexterror(void);
int notify(Ureg*);
int nrand(int);
uvlong ns2fastticks(uvlong);
-int okaddr(ulong, ulong, int);
+int okaddr(uintptr, ulong, int);
int openmode(ulong);
Block* packblock(Block*);
Block* padblock(Block*, int);
@@ -214,7 +214,7 @@ void pexit(char*, int);
void pgrpcpy(Pgrp*, Pgrp*);
void pgrpnote(ulong, char*, long, int);
int pidalloc(Proc*);
-void pio(Segment *, ulong, ulong, Page **);
+void pio(Segment *, uintptr, uintptr, Page **);
#define poperror() up->nerrlab--
void portcountpagerefs(ulong*, int);
int postnote(Proc*, int, char*, int);
@@ -287,7 +287,7 @@ void ready(Proc*);
void* realloc(void *v, ulong size);
void rebootcmd(int, char**);
void reboot(void*, void*, ulong);
-void relocateseg(Segment*, ulong);
+void relocateseg(Segment*, uintptr);
void renameuser(char*, char*);
void resched(char*);
void resrcwait(char*);
@@ -302,14 +302,14 @@ void scheddump(void);
void schedinit(void);
void (*screenputs)(char*, int);
long seconds(void);
-ulong segattach(Proc*, ulong, char *, ulong, ulong);
-void segclock(ulong);
+uintptr segattach(Proc*, ulong, char *, uintptr, ulong);
+void segclock(uintptr);
void segpage(Segment*, Page*);
int setcolor(ulong, ulong, ulong, ulong);
void setkernur(Ureg*, Proc*);
int setlabel(Label*);
-void setmalloctag(void*, ulong);
-void setrealloctag(void*, ulong);
+void setmalloctag(void*, uintptr);
+void setrealloctag(void*, uintptr);
void setregisters(Ureg*, char*, char*, int);
void setswapchan(Chan*);
char* skipslash(char*);
@@ -322,11 +322,11 @@ void splxpc(int);
char* srvname(Chan*);
void srvrenameuser(char*, char*);
void shrrenameuser(char*, char*);
-int swapcount(ulong);
+int swapcount(uintptr);
int swapfull(void);
void swapinit(void);
-void syscallfmt(ulong syscallno, ulong pc, va_list list);
-void sysretfmt(ulong syscallno, va_list list, long ret, uvlong start, uvlong stop);
+void syscallfmt(ulong syscallno, uintptr pc, va_list list);
+void sysretfmt(ulong syscallno, va_list list, uintptr ret, uvlong start, uvlong stop);
void timeradd(Timer*);
void timerdel(Timer*);
void timersinit(void);
@@ -356,9 +356,9 @@ long unionread(Chan*, void*, long);
void unlock(Lock*);
uvlong us2fastticks(uvlong);
void userinit(void);
-ulong userpc(void);
+uintptr userpc(void);
long userwrite(char*, int);
-void validaddr(ulong, ulong, int);
+void validaddr(uintptr, ulong, int);
void validname(char*, int);
char* validnamedup(char*, int);
void validstat(uchar*, int);
@@ -378,8 +378,8 @@ void xsummary(void);
void yield(void);
Segment* data2txt(Segment*);
Segment* dupseg(Segment**, int, int);
-Segment* newseg(int, ulong, ulong);
-Segment* seg(Proc*, ulong, int);
+Segment* newseg(int, uintptr, ulong);
+Segment* seg(Proc*, uintptr, int);
void hnputv(void*, uvlong);
void hnputl(void*, uint);
void hnputs(void*, ushort);