qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH] os-android: Add support to android platform


From: Paolo Bonzini
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0


On 16/09/2015 11:28, Houcheng Lin wrote:
> 2015-09-16 16:09 GMT+08:00 Paolo Bonzini <address@hidden>:
>>
>>
>>>
>>> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]