From: Jens Axboe <axboe@kernel.dk>
To: "Akers, Jason B" <jason.b.akers@intel.com>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>
Subject: Re: syscall problem on Android x86
Date: Fri, 26 Apr 2013 14:42:32 -0600 [thread overview]
Message-ID: <20130426204232.GG9563@kernel.dk> (raw)
In-Reply-To: <372C7AE269BA5E4D92B1082F530ED4B85069D109@ORSMSX110.amr.corp.intel.com>
On Fri, Apr 26 2013, Akers, Jason B wrote:
> Unfortunately android x86 doesn't have a syscall number for the shm*
> functions. They are not exposed by x86 bionic libc. So there's nothing
> to fill in for a/b/c/d.
>
> The only way I see to get syscall numbers is to patch x86 android libc
> and recompile. This should work for me today but, since the syscall
> numbers are not standardized, it will not work for anyone with an
> unmodified libc.
>
> So I propose something like:
>
> #ifndef __NR_shmget
> #if defined(__ANDROID__)
> #error "__NR_shmget not defined. See bionic libc SYSCALLS.TXT for more information."
> #else
> #define __NR_shmget 29
> #define __NR_shmat 30
> #define __NR_shmctl 31
> #define __NR_shmdt 67
> #endif
> #endif
>
> This will "break the build" for unmodified x86 android platforms, but
> I think that's better than compiling and not working.
The syscall has nothing to do with the libc installed. The libc headers
might not DEFINE the numbers. As long as the syscall is wired up in the
given kernel (which I'm assuming it is, but I really know nothing about
android), then that is enough.
> The other (probably better long-term) option is to use ashmem for
> allocating shared memory on android.
I'll gladly take patches :-)
Please stop top-posting, btw, it goes against the normal net etiquette
on this forum (and most others in the open source world).
--
Jens Axboe
next prev parent reply other threads:[~2013-04-26 20:42 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 17:43 syscall problem on Android x86 Akers, Jason B
2013-04-26 18:17 ` Jens Axboe
2013-04-26 19:46 ` Akers, Jason B
2013-04-26 20:04 ` Jens Axboe
2013-04-26 20:35 ` Akers, Jason B
2013-04-26 20:42 ` Jens Axboe [this message]
2013-04-27 1:59 ` Aaron Carroll
2013-04-27 2:27 ` Jens Axboe
2013-04-29 18:16 ` Akers, Jason B
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=20130426204232.GG9563@kernel.dk \
--to=axboe@kernel.dk \
--cc=fio@vger.kernel.org \
--cc=jason.b.akers@intel.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.