Lines Matching refs:mmap_ptr

93 	void *mmap_ptr, *tmp_ptr;  in ringbuf_subtest()  local
107 mmap_ptr = mmap(NULL, page_size, PROT_READ | PROT_WRITE, MAP_SHARED, rb_fd, 0); in ringbuf_subtest()
108 ASSERT_OK_PTR(mmap_ptr, "rw_cons_pos"); in ringbuf_subtest()
109 tmp_ptr = mremap(mmap_ptr, page_size, 2 * page_size, MREMAP_MAYMOVE); in ringbuf_subtest()
112 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_cons_pos_protect"); in ringbuf_subtest()
113 ASSERT_OK(munmap(mmap_ptr, page_size), "unmap_rw"); in ringbuf_subtest()
116 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, page_size); in ringbuf_subtest()
118 ASSERT_ERR_PTR(mmap_ptr, "wr_prod_pos"); in ringbuf_subtest()
122 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, 2 * page_size); in ringbuf_subtest()
124 ASSERT_ERR_PTR(mmap_ptr, "wr_data_page_one"); in ringbuf_subtest()
126 mmap_ptr = mmap(NULL, page_size, PROT_WRITE, MAP_SHARED, rb_fd, 3 * page_size); in ringbuf_subtest()
127 ASSERT_ERR_PTR(mmap_ptr, "wr_data_page_two"); in ringbuf_subtest()
128 mmap_ptr = mmap(NULL, 2 * page_size, PROT_WRITE, MAP_SHARED, rb_fd, 2 * page_size); in ringbuf_subtest()
129 ASSERT_ERR_PTR(mmap_ptr, "wr_data_page_all"); in ringbuf_subtest()
132 mmap_ptr = mmap(NULL, 4 * page_size, PROT_READ, MAP_SHARED, rb_fd, 0); in ringbuf_subtest()
133 if (!ASSERT_OK_PTR(mmap_ptr, "ro_prod_pos")) in ringbuf_subtest()
136 ASSERT_ERR(mprotect(mmap_ptr, 4 * page_size, PROT_WRITE), "write_protect"); in ringbuf_subtest()
137 ASSERT_ERR(mprotect(mmap_ptr, 4 * page_size, PROT_EXEC), "exec_protect"); in ringbuf_subtest()
138 ASSERT_ERR_PTR(mremap(mmap_ptr, 0, 4 * page_size, MREMAP_MAYMOVE), "ro_remap"); in ringbuf_subtest()
139 ASSERT_OK(munmap(mmap_ptr, 4 * page_size), "unmap_ro"); in ringbuf_subtest()
142 mmap_ptr = mmap(NULL, page_size, PROT_READ, MAP_SHARED, rb_fd, page_size); in ringbuf_subtest()
143 if (!ASSERT_OK_PTR(mmap_ptr, "ro_prod_pos")) in ringbuf_subtest()
146 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_WRITE), "write_protect"); in ringbuf_subtest()
147 ASSERT_ERR(mprotect(mmap_ptr, page_size, PROT_EXEC), "exec_protect"); in ringbuf_subtest()
148 ASSERT_ERR_PTR(mremap(mmap_ptr, 0, 3 * page_size, MREMAP_MAYMOVE), "ro_remap"); in ringbuf_subtest()
149 ASSERT_OK(munmap(mmap_ptr, page_size), "unmap_ro"); in ringbuf_subtest()