From dfc7244aa874ae31cc13758e1e2cf6112f7a66b4 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Mon, 2 Nov 2009 16:02:43 -0800 Subject: [PATCH] libbinder: MemoryHeapPmem: honor the NO_CACHING flag when creating a client heap Change-Id: Ia7beb800f5a24beaa4b7f3032b486d4ed1991b23 Signed-off-by: Dima Zavin --- libs/binder/MemoryHeapPmem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/binder/MemoryHeapPmem.cpp b/libs/binder/MemoryHeapPmem.cpp index 3806a42d37c5..c66094761df5 100644 --- a/libs/binder/MemoryHeapPmem.cpp +++ b/libs/binder/MemoryHeapPmem.cpp @@ -132,7 +132,7 @@ MemoryHeapPmem::MemoryHeapPmem(const sp& pmemHeap, char const * const device = pmemHeap->getDevice(); #if HAVE_ANDROID_OS if (device) { - int fd = open(device, O_RDWR); + int fd = open(device, O_RDWR | (flags & NO_CACHING ? O_SYNC : 0)); LOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno)); if (fd >= 0) { int err = ioctl(fd, PMEM_CONNECT, pmemHeap->heapID()); -- 2.11.0