Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Randolph Chung <randolph@tausq.org>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] problem with our syscall() implementation
Date: Sun, 12 Jan 2003 00:57:50 -0800	[thread overview]
Message-ID: <20030112085750.GG1177@tausq.org> (raw)

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/

                 reply	other threads:[~2003-01-12  9:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030112085750.GG1177@tausq.org \
    --to=randolph@tausq.org \
    --cc=parisc-linux@lists.parisc-linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox