Home
last modified time | relevance | path

Searched refs:map_fd (Results 1 – 13 of 13) sorted by relevance

/system/core/libion/tests/
Ddevice_test.cpp142 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 …]
Dmap_test.cpp40 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 …]
Dexit_test.cpp96 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 …]
Dallocate_test.cpp100 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()
Dinvalid_values_test.cpp117 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()
Dformerly_valid_handle_test.cpp52 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/
DBpfUtils.cpp91 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/
DBpfUtils.h150 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);
DBpfMap.h52 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/
Dion_test.c75 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()
Dion.c104 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/
Dion.h40 int flags, off_t offset, unsigned char **ptr, int *map_fd);
/system/netd/server/
DTrafficController.cpp900 std::string getMapStatus(const base::unique_fd& map_fd, const char* path) { in getMapStatus() argument
901 if (map_fd.get() < 0) { in getMapStatus()