From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [RFC PATCH] os-android: Add support to android platform, built by ndk-r10 Date: Wed, 16 Sep 2015 11:38:20 +0200 Message-ID: <55F9388C.4030504@redhat.com> References: <1442283070-3224-1-git-send-email-houcheng@gmail.com> <55F7E7B8.9020502@redhat.com> <55F923A5.3000605@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: qemu-devel@nongnu.org, Fam Zheng , linhaocheng@itri.org.tw, Peter Maydell , kvm@vger.kernel.org To: Houcheng Lin Return-path: Received: from mx1.redhat.com ([209.132.183.28]:53252 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752605AbbIPJiZ (ORCPT ); Wed, 16 Sep 2015 05:38:25 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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