Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] problem with our syscall() implementation
@ 2003-01-12  8:57 Randolph Chung
  0 siblings, 0 replies; only message in thread
From: Randolph Chung @ 2003-01-12  8:57 UTC (permalink / raw)
  To: parisc-linux

glibc provides an interface to call a system call from userspace
directly using the syscall() function.  The glibc exported interface for
syscall() is variadic (int syscall(int sysno, ...))

for hppa, the implementation has this prototype:

int syscall (int sysnum, int arg0, int arg1, int arg2, int arg3, int arg4, int arg5)

one problem with this is that one cannot reliably pass 64-bit values
into the kernel. for example, if i want to call a syscall with this
signature:

sys_foo(uint64_t x, int y, int z)
(let's say sys_foo has syscall number 300)

the x argument does not end up in arg0... instead it seems to be spread
across arg1 and arg2 (because of register alignment, i suppose)

is there any way to write syscall() so that we can pass 64-bit values
reliably?

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-01-12  9:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-12  8:57 [parisc-linux] problem with our syscall() implementation Randolph Chung

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox