summaryrefslogtreecommitdiffstats
path: root/libs/binder
diff options
context:
space:
mode:
authorDima Zavin <dima@android.com>2009-11-02 16:02:43 -0800
committerDima Zavin <dima@android.com>2009-11-02 16:36:45 -0800
commitdfc7244aa874ae31cc13758e1e2cf6112f7a66b4 (patch)
tree1df29e6222cdebda7880d145104f62a92346281d /libs/binder
parenta229cedadd6c3b8ab7f2d8b7b45638753e834992 (diff)
downloadframeworks_base-dfc7244aa874ae31cc13758e1e2cf6112f7a66b4.zip
frameworks_base-dfc7244aa874ae31cc13758e1e2cf6112f7a66b4.tar.gz
frameworks_base-dfc7244aa874ae31cc13758e1e2cf6112f7a66b4.tar.bz2
libbinder: MemoryHeapPmem: honor the NO_CACHING flag when creating a client heap
Change-Id: Ia7beb800f5a24beaa4b7f3032b486d4ed1991b23 Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'libs/binder')
-rw-r--r--libs/binder/MemoryHeapPmem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/binder/MemoryHeapPmem.cpp b/libs/binder/MemoryHeapPmem.cpp
index 3806a42..c660947 100644
--- a/libs/binder/MemoryHeapPmem.cpp
+++ b/libs/binder/MemoryHeapPmem.cpp
@@ -132,7 +132,7 @@ MemoryHeapPmem::MemoryHeapPmem(const sp<MemoryHeapBase>& 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());