Home
last modified time | relevance | path

Searched refs:prot (Results 1 – 11 of 11) sorted by relevance

/frameworks/base/core/java/android/os/
DSharedMemory.java98 private static void validateProt(int prot) { in validateProt() argument
99 if ((prot & ~PROT_MASK) != 0) { in validateProt()
129 public boolean setProtect(int prot) { in setProtect() argument
131 validateProt(prot); in setProtect()
132 int errno = nSetProt(mFileDescriptor, prot); in setProtect()
215 public @NonNull ByteBuffer map(int prot, int offset, int length) throws ErrnoException { in map() argument
217 validateProt(prot); in map()
227 long address = Os.mmap(0, length, prot, OsConstants.MAP_SHARED, mFileDescriptor, offset); in map()
228 boolean readOnly = (prot & OsConstants.PROT_WRITE) == 0; in map()
364 private static native int nSetProt(FileDescriptor fd, int prot); in nSetProt() argument
/frameworks/av/media/codec2/vndk/
DC2AllocatorIon.cpp225 int prot = PROT_NONE; in map() local
228 prot |= PROT_READ; in map()
231 prot |= PROT_WRITE; in map()
239 … c2_status_t err = mapInternal(mapSize, mapOffset, alignmentBytes, prot, flags, &(map.addr), addr); in map()
312 int prot, int flags, void** base, void** addr) { in mapInternal() argument
315 int ret = ion_map(mIonFd, mBuffer, mapSize, prot, in mapInternal()
319 mIonFd, mBuffer, mapSize, prot, flags, mapOffset, ret); in mapInternal()
328 *base = mmap(nullptr, mapSize, prot, flags, mMapFd, mapOffset); in mapInternal()
331 mapSize, prot, flags, mMapFd, mapOffset, errno); in mapInternal()
382 int prot, int flags, void** base, void** addr) { in mapInternal() argument
[all …]
/frameworks/compile/mclinker/lib/Support/Unix/
DFileSystem.inc163 int prot, flag;
166 prot = PROT_READ;
170 prot = PROT_WRITE;
174 prot = PROT_READ | PROT_WRITE;
182 pMemBuffer = ::mmap(NULL, pLength, prot, flag, m_Handler, pStartOffset);
/frameworks/base/native/android/
Dsharedmem.cpp60 int ASharedMemory_setProt(int fd, int prot) { in ASharedMemory_setProt() argument
61 return ashmem_set_prot_region(fd, prot); in ASharedMemory_setProt()
/frameworks/base/core/jni/
Dandroid_os_SharedMemory.cpp88 jint SharedMemory_nSetProt(JNIEnv* env, jobject, jobject fileDescriptor, jint prot) { in SharedMemory_nSetProt() argument
91 if (ashmem_set_prot_region(fd, prot)) { in SharedMemory_nSetProt()
/frameworks/native/include/android/
Dsharedmem.h118 int ASharedMemory_setProt(int fd, int prot) __INTRODUCED_IN(26);
/frameworks/ml/nn/runtime/
DMemory.h309 static std::pair<int, std::unique_ptr<MemoryFd>> create(size_t size, int prot, int fd,
DMemory.cpp541 std::pair<int, std::unique_ptr<MemoryFd>> MemoryFd::create(size_t size, int prot, int fd, in create() argument
566 nativeHandle->data[1] = prot; in create()
DNeuralNetworks.cpp996 int ANeuralNetworksMemory_createFromFd(size_t size, int prot, int fd, size_t offset, in ANeuralNetworksMemory_createFromFd() argument
1002 std::tie(n, m) = MemoryFd::create(size, prot, fd, offset); in ANeuralNetworksMemory_createFromFd()
/frameworks/ml/nn/common/
DCpuExecutor.cpp343 const int prot = mHidlMemory.handle()->data[1]; in flush() local
344 if (prot & PROT_WRITE) { in flush()
376 int prot = hidlMemory.handle()->data[1]; in createFromHidlMemory() local
378 buffer = static_cast<uint8_t*>(mmap(nullptr, size, prot, MAP_SHARED, fd, offset)); in createFromHidlMemory()
/frameworks/ml/nn/tools/api/
DNeuralNetworks.t1490 * @param prot The desired memory protection for the mapping.