/system/core/libion/tests/ |
D | device_test.cpp | 142 int map_fd = -1; in TEST_F() local 145 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, 4096, 0, heapMask, flags, &map_fd)); in TEST_F() 146 ASSERT_GE(map_fd, 0); in TEST_F() 149 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 156 readKernel(map_fd, buf, 4096); in TEST_F() 163 ASSERT_EQ(0, close(map_fd)); in TEST_F() 177 int map_fd = -1; in TEST_F() local 180 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, 4096, 0, heapMask, flags, &map_fd)); in TEST_F() 181 ASSERT_GE(map_fd, 0); in TEST_F() 184 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() [all …]
|
D | map_test.cpp | 40 int map_fd = -1; in TEST_F() local 42 …ASSERT_EQ(0, ion_map(m_ionFd, handle, size, PROT_READ | PROT_WRITE, MAP_SHARED, 0, &ptr, &map_fd)); in TEST_F() 44 ASSERT_GE(map_fd, 0); in TEST_F() 46 ASSERT_EQ(0, close(map_fd)); in TEST_F() 64 int map_fd = -1; in TEST_F() local 66 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, 0, &map_fd)); in TEST_F() 67 ASSERT_GE(map_fd, 0); in TEST_F() 70 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 73 ASSERT_EQ(0, close(map_fd)); in TEST_F() 86 int map_fd = -1; in TEST_F() local [all …]
|
D | exit_test.cpp | 96 int map_fd = -1; in TEST_F() 98 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, 0, &map_fd)); in TEST_F() 99 ASSERT_GE(map_fd, 0); in TEST_F() 102 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 119 int map_fd = -1; in TEST_F() 121 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, 0, &map_fd)); in TEST_F() 122 ASSERT_GE(map_fd, 0); in TEST_F() 125 ptr = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 143 int map_fd = -1; in TEST_F() 145 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, size, 0, heapMask, ION_FLAG_CACHED, &map_fd)); in TEST_F() [all …]
|
D | allocate_test.cpp | 100 int map_fd = -1; in TEST_F() local 102 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, 4096, 0, heapMask, 0, &map_fd)); in TEST_F() 103 ASSERT_GE(map_fd, 0); in TEST_F() 106 ptr = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F() 112 fds[i] = map_fd; in TEST_F() 120 int map_fd = -1; in TEST_F() local 122 ASSERT_EQ(0, ion_alloc_fd(newIonFd, 4096, 0, heapMask, 0, &map_fd)); in TEST_F() 123 ASSERT_GE(map_fd, 0); in TEST_F() 126 ptr = mmap(NULL, 4096, PROT_READ, MAP_SHARED, map_fd, 0); in TEST_F() 132 ASSERT_EQ(0, close(map_fd)); in TEST_F()
|
D | invalid_values_test.cpp | 117 int map_fd; in TEST_F() local 121 int ret = ion_map(0, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd); in TEST_F() 124 EXPECT_EQ(-EBADF, ion_map(-1, m_validHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 126 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, 0, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 128 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_badHandle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 130 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 0, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F() 132 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, -1, 0, 0, &ptr, &map_fd)); in TEST_F() 134 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, -1, &ptr, &map_fd)); in TEST_F() 136 EXPECT_EQ(-EINVAL, ion_map(m_ionFd, m_validHandle, 4096, PROT_READ, 0, 0, NULL, &map_fd)); in TEST_F()
|
D | formerly_valid_handle_test.cpp | 52 int map_fd; in TEST_F() local 55 ASSERT_EQ(-EINVAL, ion_map(m_ionFd, m_handle, 4096, PROT_READ, 0, 0, &ptr, &map_fd)); in TEST_F()
|
/system/bpf/libbpf_android/ |
D | BpfUtils.cpp | 91 int writeToMapEntry(const base::unique_fd& map_fd, void* key, void* value, uint64_t flags) { in writeToMapEntry() argument 94 attr.map_fd = map_fd.get(); in writeToMapEntry() 102 int findMapEntry(const base::unique_fd& map_fd, void* key, void* value) { in findMapEntry() argument 105 attr.map_fd = map_fd.get(); in findMapEntry() 112 int deleteMapEntry(const base::unique_fd& map_fd, void* key) { in deleteMapEntry() argument 115 attr.map_fd = map_fd.get(); in deleteMapEntry() 121 int getNextMapKey(const base::unique_fd& map_fd, void* key, void* next_key) { in getNextMapKey() argument 124 attr.map_fd = map_fd.get(); in getNextMapKey() 131 int getFirstMapKey(const base::unique_fd& map_fd, void* firstKey) { in getFirstMapKey() argument 134 attr.map_fd = map_fd.get(); in getFirstMapKey() [all …]
|
/system/bpf/libbpf_android/include/bpf/ |
D | BpfUtils.h | 150 int writeToMapEntry(const base::unique_fd& map_fd, void* key, void* value, uint64_t flags); 151 int findMapEntry(const base::unique_fd& map_fd, void* key, void* value); 152 int deleteMapEntry(const base::unique_fd& map_fd, void* key); 153 int getNextMapKey(const base::unique_fd& map_fd, void* key, void* next_key); 154 int getFirstMapKey(const base::unique_fd& map_fd, void* firstKey); 157 int bpfFdPin(const base::unique_fd& map_fd, const char* pathname);
|
D | BpfMap.h | 52 int map_fd = createMap(map_type, sizeof(Key), sizeof(Value), max_entries, map_flags); variable 53 if (map_fd < 0) { 56 mMapFd.reset(map_fd);
|
/system/core/libion/ |
D | ion_test.c | 75 int fd, map_fd, ret; in ion_map_test() local 83 ret = ion_map(fd, handle, len, prot, map_flags, 0, &ptr, &map_fd); in ion_map_test() 98 close(map_fd); in ion_map_test() 105 close(map_fd); in ion_map_test() 109 close(map_fd); in ion_map_test() 110 ret = ion_map(fd, handle, len, prot, flags, 0, &ptr, &map_fd); in ion_map_test()
|
D | ion.c | 104 unsigned char** ptr, int* map_fd) { in ion_map() argument 112 if (map_fd == NULL) return -EINVAL; in ion_map() 126 *map_fd = data.fd; in ion_map()
|
/system/core/libion/include/ion/ |
D | ion.h | 40 int flags, off_t offset, unsigned char **ptr, int *map_fd);
|
/system/netd/server/ |
D | TrafficController.cpp | 900 std::string getMapStatus(const base::unique_fd& map_fd, const char* path) { in getMapStatus() argument 901 if (map_fd.get() < 0) { in getMapStatus()
|