From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48762) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zc9Ac-0007vE-8F for qemu-devel@nongnu.org; Wed, 16 Sep 2015 05:38:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zc9AY-000092-CS for qemu-devel@nongnu.org; Wed, 16 Sep 2015 05:38:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:35910) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zc9AY-00008y-6z for qemu-devel@nongnu.org; Wed, 16 Sep 2015 05:38:26 -0400 References: <1442283070-3224-1-git-send-email-houcheng@gmail.com> <55F7E7B8.9020502@redhat.com> <55F923A5.3000605@redhat.com> From: Paolo Bonzini Message-ID: <55F9388C.4030504@redhat.com> Date: Wed, 16 Sep 2015 11:38:20 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH] os-android: Add support to android platform, built by ndk-r10 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Houcheng Lin Cc: linhaocheng@itri.org.tw, Peter Maydell , Fam Zheng , qemu-devel@nongnu.org, kvm@vger.kernel.org On 16/09/2015 11:28, Houcheng Lin wrote: > 2015-09-16 16:09 GMT+08:00 Paolo Bonzini : >> >> >>> >>> 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