am 0a5201f0: am dfc7244a: libbinder: MemoryHeapPmem: honor the NO_CACHING flag when creating a client heap
Merge commit '0a5201f01cac963752e0b4635f081c73cb6f1959' into eclair-mr2-plus-aosp * commit '0a5201f01cac963752e0b4635f081c73cb6f1959': libbinder: MemoryHeapPmem: honor the NO_CACHING flag when creating a client heap
This commit is contained in:
@@ -132,7 +132,7 @@ MemoryHeapPmem::MemoryHeapPmem(const sp<MemoryHeapBase>& pmemHeap,
|
|||||||
char const * const device = pmemHeap->getDevice();
|
char const * const device = pmemHeap->getDevice();
|
||||||
#if HAVE_ANDROID_OS
|
#if HAVE_ANDROID_OS
|
||||||
if (device) {
|
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));
|
LOGE_IF(fd<0, "couldn't open %s (%s)", device, strerror(errno));
|
||||||
if (fd >= 0) {
|
if (fd >= 0) {
|
||||||
int err = ioctl(fd, PMEM_CONNECT, pmemHeap->heapID());
|
int err = ioctl(fd, PMEM_CONNECT, pmemHeap->heapID());
|
||||||
|
|||||||
Reference in New Issue
Block a user