public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Boyd Stephen Smith Jr." <bss03@volumehost.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] _syscallX isn't in linux-headers-2.6.20 ??
Date: Thu, 8 Feb 2007 04:40:49 -0600	[thread overview]
Message-ID: <200702080440.49322.bss03@volumehost.net> (raw)
In-Reply-To: <1170895989.14243.49.camel@orpheus>

[-- Attachment #1: Type: text/plain, Size: 1836 bytes --]

On Wednesday 07 February 2007 18:53, Iain Buchanan wrote:
> Hi all,
>
> I'm trying to use:
>
> _syscall3(int, ioprio_set, int, which, int, who, int, ioprio);
> _syscall2(int, ioprio_get, int, which, int, who);
>
> and supposedly I just
>
> #include <linux/unistd.h>
>
> but I'm getting these error from gcc:
>
> error: syntax error before "ioprio_set"
> warning: data definition has no type or storage class
> error: syntax error before "ioprio_get"
> warning: data definition has no type or storage class
>
> so I had a look in /usr/include/linux/unistd.h and it doesn't even have
> _syscall in there!! It's in /usr/src/linux though...

That means that the kernel devs have decided that API is not userland safe.  
In recent kernels, there's a specific 'headers' (or somesuch) make target, 
that generates .h files that are appropriate to use in userland.

If you need access to APIs that aren't in those headers, you should be 
writing 
a kernel module, or convincing the kernel developers to expose these APIs 
to 
userland.  Your kernel module may need be only a tiny stub, just something 
to 
go between your userland and the non-userland-safe APIs.

> Am I doing something wrong?

It's possible you just need another header.  It also possible that there's 
a 
different entry point now. I seem to remember the location of the syscall 
table is recently changed to something like randomized per-process at some 
point in the 2.6.1x line.  That may have changed how you need to be calling 
things.

-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
bss03@volumehost.net                      ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.org/                      \_/     
New GPG Key!  Old key expires 2007-03-25.  Upgrade NOW!

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

      parent reply	other threads:[~2007-02-08 10:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-08  0:53 [gentoo-user] _syscallX isn't in linux-headers-2.6.20 ?? Iain Buchanan
2007-02-08  5:10 ` [gentoo-user] " Christian Marie
2007-02-08  7:01   ` Iain Buchanan
2007-02-08 10:40 ` Boyd Stephen Smith Jr. [this message]

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=200702080440.49322.bss03@volumehost.net \
    --to=bss03@volumehost.net \
    --cc=gentoo-user@lists.gentoo.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