From 6c2e983d328874ea41cb35bacb510bf2709a229f Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 20 Jan 2014 00:47:55 +0100 Subject: 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. --- sys/src/9/omap/syscall.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/src/9/omap') diff --git a/sys/src/9/omap/syscall.c b/sys/src/9/omap/syscall.c index 378a08a21..0a3916690 100644 --- a/sys/src/9/omap/syscall.c +++ b/sys/src/9/omap/syscall.c @@ -222,7 +222,7 @@ syscall(Ureg* ureg) /* iprint("%s: syscall %s\n", up->text, sysctab[scallnr]?sysctab[scallnr]:"huh?"); */ - ret = systab[scallnr](up->s.args); + ret = systab[scallnr]((va_list)up->s.args); poperror(); }else{ /* failure: save the error buffer for errstr */ @@ -271,8 +271,9 @@ syscall(Ureg* ureg) kexit(ureg); } -long /* void* */ -execregs(ulong entry, ulong ssize, ulong nargs) + +uintptr +execregs(uintptr entry, ulong ssize, ulong nargs) { ulong *sp; Ureg *ureg; -- cgit v1.2.3