From: Paolo Bonzini <pbonzini@redhat.com>
To: Houcheng Lin <houcheng@gmail.com>
Cc: qemu-devel@nongnu.org, Fam Zheng <famz@redhat.com>,
linhaocheng@itri.org.tw, Peter Maydell <peter.maydell@linaro.org>,
kvm@vger.kernel.org
Subject: Re: [RFC PATCH] os-android: Add support to android platform, built by ndk-r10
Date: Wed, 16 Sep 2015 11:38:20 +0200 [thread overview]
Message-ID: <55F9388C.4030504@redhat.com> (raw)
In-Reply-To: <CAL8JtxBQb1Hg9Dqy2Os7fBLF-rE+3viWOuKZ6Qd488MH2EsqcA@mail.gmail.com>
On 16/09/2015 11:28, Houcheng Lin wrote:
> 2015-09-16 16:09 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>>
>>
>>>
>>> I'll modify the bionic C library to support these functions and feedback
>>> to google's AOSP project. But the android kernel does not support shmem,
>>
>> It doesn't support tmpfs? /dev/shm is just a tmpfs.
>>
>> Paolo
>
> Oh, you are right. The android have shmget, shmat, shmdt functions in
> their libc. The POSIX shm_open can built on top of these. I'll fix my
> libc to support posix share memory functions.
Actually it's even simpler. shm_open is basically just
char *s;
int fd;
asprintf(&s, "/dev/shm/%s", name);
fd = open(s, name | O_CLOEXEC, mode);
free(s);
return fd;
plus some error checking. Do Android systems have /dev/shm?
Paolo
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Houcheng Lin <houcheng@gmail.com>
Cc: linhaocheng@itri.org.tw, Peter Maydell <peter.maydell@linaro.org>,
Fam Zheng <famz@redhat.com>,
qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: Re: [Qemu-devel] [RFC PATCH] os-android: Add support to android platform, built by ndk-r10
Date: Wed, 16 Sep 2015 11:38:20 +0200 [thread overview]
Message-ID: <55F9388C.4030504@redhat.com> (raw)
In-Reply-To: <CAL8JtxBQb1Hg9Dqy2Os7fBLF-rE+3viWOuKZ6Qd488MH2EsqcA@mail.gmail.com>
On 16/09/2015 11:28, Houcheng Lin wrote:
> 2015-09-16 16:09 GMT+08:00 Paolo Bonzini <pbonzini@redhat.com>:
>>
>>
>>>
>>> I'll modify the bionic C library to support these functions and feedback
>>> to google's AOSP project. But the android kernel does not support shmem,
>>
>> It doesn't support tmpfs? /dev/shm is just a tmpfs.
>>
>> Paolo
>
> Oh, you are right. The android have shmget, shmat, shmdt functions in
> their libc. The POSIX shm_open can built on top of these. I'll fix my
> libc to support posix share memory functions.
Actually it's even simpler. shm_open is basically just
char *s;
int fd;
asprintf(&s, "/dev/shm/%s", name);
fd = open(s, name | O_CLOEXEC, mode);
free(s);
return fd;
plus some error checking. Do Android systems have /dev/shm?
Paolo
next prev parent reply other threads:[~2015-09-16 9:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-15 2:11 [RFC PATCH] os-android: Add support to android platform, built by ndk-r10 Houcheng Lin
2015-09-15 9:41 ` Paolo Bonzini
2015-09-15 17:26 ` Houcheng Lin
2015-09-15 17:34 ` Houcheng Lin
2015-09-15 17:34 ` [Qemu-devel] " Houcheng Lin
2015-09-16 8:09 ` Paolo Bonzini
2015-09-16 8:09 ` [Qemu-devel] " Paolo Bonzini
2015-09-16 9:28 ` Houcheng Lin
2015-09-16 9:28 ` [Qemu-devel] " Houcheng Lin
2015-09-16 9:38 ` Paolo Bonzini [this message]
2015-09-16 9:38 ` Paolo Bonzini
2015-09-16 9:54 ` Houcheng Lin
2015-09-16 9:54 ` [Qemu-devel] " Houcheng Lin
2015-09-16 10:28 ` Paolo Bonzini
2015-09-16 10:28 ` [Qemu-devel] " Paolo Bonzini
2015-09-15 10:19 ` Fam Zheng
-- strict thread matches above, loose matches on Subject: below --
2015-09-15 5:11 Houcheng Lin
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=55F9388C.4030504@redhat.com \
--to=pbonzini@redhat.com \
--cc=famz@redhat.com \
--cc=houcheng@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linhaocheng@itri.org.tw \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.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 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.