Home
last modified time | relevance | path

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

/system/core/libion/tests/
Ddevice_test.cpp141 int map_fd = -1; in TEST_F() local
144 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, 4096, 0, heapMask, flags, &map_fd)); in TEST_F()
145 ASSERT_GE(map_fd, 0); in TEST_F()
148 ptr = mmap(NULL, 4096, PROT_READ | PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
155 readKernel(map_fd, buf, 4096); in TEST_F()
162 ASSERT_EQ(0, close(map_fd)); in TEST_F()
178 int map_fd = -1; in TEST_F() local
181 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, 4096, 0, heapMask, flags, &map_fd)); in TEST_F()
182 ASSERT_GE(map_fd, 0); in TEST_F()
185 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.cpp99 int map_fd = -1; in TEST_F() local
101 ASSERT_EQ(0, ion_alloc_fd(m_ionFd, 4096, 0, heapMask, 0, &map_fd)); in TEST_F()
102 ASSERT_GE(map_fd, 0); in TEST_F()
105 ptr = mmap(NULL, 4096, PROT_WRITE, MAP_SHARED, map_fd, 0); in TEST_F()
111 fds[i] = map_fd; in TEST_F()
119 int map_fd = -1; in TEST_F() local
121 ASSERT_EQ(0, ion_alloc_fd(newIonFd, 4096, 0, heapMask, 0, &map_fd)); in TEST_F()
122 ASSERT_GE(map_fd, 0); in TEST_F()
125 ptr = mmap(NULL, 4096, PROT_READ, MAP_SHARED, map_fd, 0); in TEST_F()
131 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/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.c91 int flags, off_t offset, unsigned char **ptr, int *map_fd) in ion_map() argument
99 if (map_fd == NULL) in ion_map()
116 *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);