diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-20 00:47:55 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2014-01-20 00:47:55 +0100 |
commit | 6c2e983d328874ea41cb35bacb510bf2709a229f (patch) | |
tree | e2a5c596a3fcd1af3ed792494b78f2d503911b44 /sys/src/9/alphapc | |
parent | b99ecee6cd8c7c9fce1ff2cfa56d5a6807a0fc7c (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/alphapc')
-rw-r--r-- | sys/src/9/alphapc/mmu.c | 2 | ||||
-rw-r--r-- | sys/src/9/alphapc/trap.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/9/alphapc/mmu.c b/sys/src/9/alphapc/mmu.c index 05ff63a5e..c15d176d7 100644 --- a/sys/src/9/alphapc/mmu.c +++ b/sys/src/9/alphapc/mmu.c @@ -274,7 +274,7 @@ upafree(ulong, int) } void -checkmmu(ulong, ulong) +checkmmu(uintptr, uintptr) { } diff --git a/sys/src/9/alphapc/trap.c b/sys/src/9/alphapc/trap.c index 70317bb0c..0861abbce 100644 --- a/sys/src/9/alphapc/trap.c +++ b/sys/src/9/alphapc/trap.c @@ -728,7 +728,7 @@ syscall(Ureg *aur) up->s = *((Sargs*)(sp+2*BY2WD)); up->psstate = sysctab[scallnr]; - ret = systab[scallnr](up->s.args); + ret = systab[scallnr]((va_list)up->s.args); poperror(); }else{ /* failure: save the error buffer for errstr */ @@ -794,8 +794,8 @@ kprocchild(Proc *p, void (*func)(void*), void *arg) p->kparg = arg; } -long -execregs(ulong entry, ulong ssize, ulong nargs) +uintptr +execregs(uintptr entry, ulong ssize, ulong nargs) { Ureg *ur; ulong *sp; @@ -809,7 +809,7 @@ execregs(ulong entry, ulong ssize, ulong nargs) return USTKTOP-BY2WD; /* address of user-level clock */ } -ulong +uintptr userpc(void) { Ureg *ur; @@ -842,7 +842,7 @@ setkernur(Ureg *xp, Proc *p) xp->r26 = (ulong)sched; } -ulong +uintptr dbgpc(Proc *p) { Ureg *ur; |