Home
last modified time | relevance | path

Searched refs:mach_task_self (Results 1 – 25 of 219) sorted by relevance

123456789

/xnu-12377.81.4/tests/
H A Dmach_port_mod_refs.c17 ret = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_PORT_SET, &port_set);
20 ret = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port);
26 ret = task_get_exc_guard_behavior(mach_task_self(), &old);
29 ret = task_set_exc_guard_behavior(mach_task_self(), new);
37 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND, -1);
41 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_SEND_ONCE, -1);
45 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_PORT_SET, -1);
49 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_DEAD_NAME, -1);
53 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_LABELH, -1);
57 ret = mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_NUMBER, -1);
[all …]
H A Dtask_ident_test.c28 kr = task_create_identity_token(mach_task_self(), &token);
31 port1 = mach_task_self();
36 mach_port_deallocate(mach_task_self(), port2);
38 kr = task_get_special_port(mach_task_self(), TASK_READ_PORT, &port1);
44 mach_port_deallocate(mach_task_self(), port1);
45 mach_port_deallocate(mach_task_self(), port2);
47 kr = task_get_special_port(mach_task_self(), TASK_INSPECT_PORT, &port1);
53 mach_port_deallocate(mach_task_self(), port1);
54 mach_port_deallocate(mach_task_self(), port2);
56 kr = task_get_special_port(mach_task_self(), TASK_NAME_PORT, &port1);
[all …]
H A Dvm_test_mach_map.c88 kr = mach_vm_allocate(mach_task_self(), in test_memory_entry_tagging()
101 kr = mach_vm_allocate(mach_task_self(), in test_memory_entry_tagging()
139 kr = mach_make_memory_entry_64(mach_task_self(), in test_memory_entry_tagging()
171 kr = mach_vm_map(mach_task_self(), in test_memory_entry_tagging()
214 kr = mach_vm_region_recurse(mach_task_self(), in test_memory_entry_tagging()
258 mach_vm_deallocate(mach_task_self(), in test_memory_entry_tagging()
265 mach_vm_deallocate(mach_task_self(), in test_memory_entry_tagging()
272 mach_vm_deallocate(mach_task_self(), in test_memory_entry_tagging()
279 mach_port_deallocate(mach_task_self(), mem_entry_copied); in test_memory_entry_tagging()
283 mach_port_deallocate(mach_task_self(), mem_entry_shared); in test_memory_entry_tagging()
[all …]
H A Darm_mte.c75 kr = task_info(mach_task_self(), in task_footprint()
95 …kern_return_t kr = vm_allocate(mach_task_self(), &address, ALLOC_SIZE, VM_FLAGS_ANYWHERE | VM_FLAG… in do_mte_tag_check()
160 vm_deallocate(mach_task_self(), address, ALLOC_SIZE); in do_mte_tag_check()
207 kern_return_t kr = vm_allocate(mach_task_self(), &address, MTE_GRANULE_SIZE, VM_FLAGS_ANYWHERE);
222 vm_deallocate(mach_task_self(), address, MTE_GRANULE_SIZE);
234 …kern_return_t kr = vm_allocate(mach_task_self(), &address, buf_size, VM_FLAGS_ANYWHERE | VM_FLAGS_… in run_mte_copyio_tests()
313 vm_deallocate(mach_task_self(), address, buf_size); in run_mte_copyio_tests()
434 …kern_return_t kr = vm_allocate(mach_task_self(), &address, vm_alloc_sz, VM_FLAGS_ANYWHERE | VM_FLA… in do_fork_test()
516 kr = vm_deallocate(mach_task_self(), address, vm_alloc_sz); in do_fork_test()
527 kr = vm_deallocate(mach_task_self(), address, vm_alloc_sz); in do_fork_test()
[all …]
H A Dmach_service_port.c35 …return mach_port_set_attributes(mach_task_self(), service_port, MACH_PORT_SERVICE_THROTTLED, (mach… in service_port_set_throttled()
45 …kr = mach_port_get_attributes(mach_task_self(), service_port, MACH_PORT_SERVICE_THROTTLED, (mach_p… in service_port_get_throttled()
67 kr = mach_port_construct(mach_task_self(), &opts, SP_CONTEXT, &service_port);
75 kr = mach_port_construct(mach_task_self(), &opts2, 0x0, &connection_port);
78 kr = mach_port_is_connection_for_service(mach_task_self(), connection_port, service_port, &fpid);
101 kr = mach_port_destruct(mach_task_self(), service_port, 0, SP_CONTEXT);
122 kr = mach_port_get_service_port_info(mach_task_self(), service_port, &sp_info); in do_mach_notify_port_destroyed()
131 …kr = mach_port_assert_attributes(mach_task_self(), service_port, MACH_PORT_GUARD_INFO, (mach_port_… in do_mach_notify_port_destroyed()
182 kr = mach_port_construct(mach_task_self(), &opts, SP_CONTEXT, &service_port_2);
190 kr = mach_port_construct(mach_task_self(), &opts2, SP_CONTEXT, &service_port_2);
[all …]
H A Dexc_guard_helper_test.c71 kern_return_t kr = mach_vm_region_recurse(mach_task_self(), in is_hole()
137 kr = task_get_exc_guard_behavior(mach_task_self(), &disabling_behavior); in enable_exc_guard_of_type_and_verify()
140 kr = task_set_exc_guard_behavior(mach_task_self(), disabling_behavior); in enable_exc_guard_of_type_and_verify()
148 kr = task_get_exc_guard_behavior(mach_task_self(), &new_behavior); in enable_exc_guard_of_type_and_verify()
187 kr = mach_vm_allocate(mach_task_self(), &allocated, PAGE_SIZE * 3,
194 kr = mach_vm_deallocate(mach_task_self(), allocated + PAGE_SIZE, PAGE_SIZE);
212 kr = mach_vm_deallocate(mach_task_self(), allocated, PAGE_SIZE * 3);
220 kr = mach_vm_deallocate(mach_task_self(), allocated, PAGE_SIZE * 3);
265 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port);
267 kr = mach_port_insert_right(mach_task_self(), port, port, MACH_MSG_TYPE_MAKE_SEND);
[all …]
H A Dexception_ports_info.c45 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &exc_port1);
47 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &exc_port2);
49 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &exc_port3);
56 kr = mach_port_insert_right(mach_task_self(), exc_port1, exc_port1, MACH_MSG_TYPE_MAKE_SEND);
58 kr = mach_port_insert_right(mach_task_self(), exc_port2, exc_port2, MACH_MSG_TYPE_MAKE_SEND);
60 kr = mach_port_insert_right(mach_task_self(), exc_port3, exc_port3, MACH_MSG_TYPE_MAKE_SEND);
69 mach_task_self(),
77 mach_task_self(),
85 mach_task_self(),
104 …kr = task_get_exception_ports_info(mach_task_self(), EXC_MASK_ALL, masks, &count, ports_info, beha…
[all …]
H A Darm_mte_unentitled.c53 …kern_return_t kr = vm_allocate(mach_task_self(), &address, alloc_size, VM_FLAGS_ANYWHERE | VM_FLAG…
58 kr = vm_deallocate(mach_task_self(), address, alloc_size);
113 kr = task_for_pid(mach_task_self(), child_pid, &child_task);
119 kr = vm_remap(mach_task_self(), &dest_addr, ALLOC_SIZE,
126 kr = vm_allocate(mach_task_self(), &src_addr, ALLOC_SIZE, VM_FLAGS_ANYWHERE);
132 kr = mach_vm_copy(mach_task_self(), src_addr, ALLOC_SIZE, dest_addr);
142 kr = mach_vm_deallocate(mach_task_self(), dest_addr, ALLOC_SIZE);
144 kr = mach_vm_deallocate(mach_task_self(), src_addr, ALLOC_SIZE);
146 kr = mach_port_deallocate(mach_task_self(), child_task);
H A Dtask_is_self.c18 …T_ASSERT_MACH_SUCCESS(task_get_special_port(mach_task_self(), TASK_READ_PORT, &self_read), "task_g…
19 …T_ASSERT_MACH_SUCCESS(task_get_special_port(mach_task_self(), TASK_INSPECT_PORT, &self_insp), "tas…
20 …T_ASSERT_MACH_SUCCESS(task_get_special_port(mach_task_self(), TASK_NAME_PORT, &self_name), "task_g…
22 …T_ASSERT_MACH_SUCCESS(mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &port), "mach_…
25 T_EXPECT_NE(self_read, mach_task_self(), "read and control port should be different");
27 T_EXPECT_EQ(1, mach_task_is_self(mach_task_self()), "control port should point to self");
H A Dmach_eventlink.c26 kr = mach_eventlink_create(mach_task_self(), MELC_OPTION_NO_COPYIN, port_pair); in test_eventlink_create()
284 mach_port_deallocate(mach_task_self(), port_pair[0]);
285 mach_port_deallocate(mach_task_self(), port_pair[1]);
411 mach_port_deallocate(mach_task_self(), port_pair[0]);
412 mach_port_deallocate(mach_task_self(), port_pair[1]);
438 mach_port_deallocate(mach_task_self(), port_pair[0]);
439 mach_port_deallocate(mach_task_self(), port_pair[1]);
465 kr = mach_port_mod_refs(mach_task_self(), port_pair[0], MACH_PORT_RIGHT_SEND, 2);
473 mach_port_deallocate(mach_task_self(), port_pair[1]);
500 kr = mach_port_mod_refs(mach_task_self(), port_pair[1], MACH_PORT_RIGHT_SEND, 2);
[all …]
H A Dtask_policy.c30 T_ASSERT_MACH_SUCCESS(task_name_for_pid(mach_task_self(), getpid(),
48 T_ASSERT_MACH_SUCCESS(task_policy_set(mach_task_self(),
64 T_ASSERT_MACH_SUCCESS(task_inspect_for_pid(mach_task_self(), getpid(),
92 T_ASSERT_MACH_SUCCESS(task_for_pid(mach_task_self(), pid,
122 T_ASSERT_MACH_SUCCESS(task_name_for_pid(mach_task_self(), pid,
152 T_ASSERT_MACH_SUCCESS(task_inspect_for_pid(mach_task_self(), pid,
174 T_ASSERT_MACH_SUCCESS(task_name_for_pid(mach_task_self(), getpid(),
192 T_ASSERT_MACH_SUCCESS(task_policy_get(mach_task_self(),
208 T_ASSERT_MACH_SUCCESS(task_inspect_for_pid(mach_task_self(), getpid(),
235 T_ASSERT_MACH_SUCCESS(task_inspect_for_pid(mach_task_self(), pid,
[all …]
/xnu-12377.81.4/tests/ipc/
H A Dimm_pinned_control_port_crasher.c36 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &server); in attempt_send_immovable_port()
39 kr = mach_port_insert_right(mach_task_self(), server, server, MACH_MSG_TYPE_MAKE_SEND); in attempt_send_immovable_port()
67 kern_return_t kr = mach_port_mod_refs(mach_task_self(), thread_self, MACH_PORT_RIGHT_SEND, -2); in pinned_test_main_thread_mod_ref()
77 kern_return_t kr = mach_port_deallocate(mach_task_self(), th_self); in pthread_run()
98 mach_port_t task_self = mach_task_self(); in pinned_test_task_self_dealloc()
112 …kern_return_t kr = mach_port_mod_refs(mach_task_self(), mach_task_self(), MACH_PORT_RIGHT_SEND, -3… in pinned_test_task_self_mod_ref()
125 mach_port_deallocate(mach_task_self(), th_kp); in pinned_test_task_threads_mod_ref()
127 kr = task_threads(mach_task_self(), &th_list, &th_cnt); in pinned_test_task_threads_mod_ref()
128 mach_port_deallocate(mach_task_self(), th_list[0]); in pinned_test_task_threads_mod_ref()
130 kr = mach_port_mod_refs(mach_task_self(), th_list[0], MACH_PORT_RIGHT_SEND, -1); in pinned_test_task_threads_mod_ref()
[all …]
H A Dimm_pinned_control_port_entitled.c64 kr = task_get_special_port(mach_task_self(), TASK_KERNEL_PORT, &port); in test_task_thread_port_values()
66 T_EXPECT_EQ(port, mach_task_self(), "TASK_KERNEL_PORT should match mach_task_self()"); in test_task_thread_port_values()
67 mach_port_deallocate(mach_task_self(), port); in test_task_thread_port_values()
69 kr = task_for_pid(mach_task_self(), getpid(), &port); in test_task_thread_port_values()
71 T_EXPECT_EQ(port, mach_task_self(), "task_for_pid(self) should match mach_task_self()"); in test_task_thread_port_values()
72 mach_port_deallocate(mach_task_self(), port); in test_task_thread_port_values()
78 mach_port_deallocate(mach_task_self(), port); in test_task_thread_port_values()
81 kr = task_threads(mach_task_self(), &threadList, &threadCount); in test_task_thread_port_values()
95 mach_port_deallocate(mach_task_self(), threadList[i]); in test_task_thread_port_values()
99 mach_vm_deallocate(mach_task_self(), in test_task_thread_port_values()
[all …]
H A Dipc_read_inspect.c65 mach_port_deallocate(mach_task_self(), special_port); in test_task_get_special_port()
70 mach_port_deallocate(mach_task_self(), special_port); in test_task_get_special_port()
75 mach_port_deallocate(mach_task_self(), special_port); in test_task_get_special_port()
82 kr = task_read_for_pid(mach_task_self(), getpid(), &tfp_port); in test_task_get_special_port()
85 mach_port_deallocate(mach_task_self(), tfp_port); in test_task_get_special_port()
87 mach_port_deallocate(mach_task_self(), special_port); in test_task_get_special_port()
94 kr = task_inspect_for_pid(mach_task_self(), getpid(), &tfp_port); in test_task_get_special_port()
97 mach_port_deallocate(mach_task_self(), tfp_port); in test_task_get_special_port()
99 mach_port_deallocate(mach_task_self(), special_port); in test_task_get_special_port()
106 kr = task_name_for_pid(mach_task_self(), getpid(), &tfp_port); in test_task_get_special_port()
[all …]
H A Dport_api.c25 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_PORT_SET, &pset);
28 kr = mach_port_insert_right(mach_task_self(), pset, pset,
39 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp);
43 kr = mach_port_type(mach_task_self(), mp, &ty);
47 kr = mach_port_type(mach_task_self(), mp & ~0x3u, &ty);
51 kr = mach_port_destruct(mach_task_self(), mp, 0, 0);
54 kr = mach_port_type(mach_task_self(), mp, &ty);
57 kr = mach_port_allocate(mach_task_self(), MACH_PORT_RIGHT_RECEIVE, &mp2);
65 kr = mach_port_destruct(mach_task_self(), mp2, 0, 0);
H A Dimmovable_rights.c20 kr = mach_port_construct(mach_task_self(), &opts, 0x10, &imm_port);
25 kr = mach_port_get_attributes(mach_task_self(), imm_port,
34 kr = mach_port_construct(mach_task_self(), &opts2, 0, &imm_port2);
37 …kr = mach_port_guard_with_flags(mach_task_self(), imm_port2, 0x11, (uint64_t)MPG_IMMOVABLE_RECEIVE…
40 kr = mach_port_get_attributes(mach_task_self(), imm_port2,
46 kr = mach_port_swap_guard(mach_task_self(), imm_port2, 0x11, 0xde18);
49 kr = mach_port_unguard(mach_task_self(), imm_port2, 0xde18);
H A Dmach_port_construct_errors.c59 kern_return_t kr = mach_port_construct(mach_task_self(), &opts, 0x0, &port);
77 kr = mach_port_construct(mach_task_self(), &conn_opts, 0x0, &port);
84 kr = mach_port_construct(mach_task_self(), &conn_opts, 0x0, &port);
86 kr = mach_port_destruct(mach_task_self(), port, 0, 0);
94 kr = mach_port_construct(mach_task_self(), &qlimit_opts, 0x0, &port);
105 kr = mach_port_construct(mach_task_self(), &unknown_flags_opts, 0x0, &port);
124 (void)mach_port_construct(mach_task_self(), &opts, 0x0, &port);
143 kr = mach_port_construct(mach_task_self(), &opts, 0x0, &port);
H A Dipc_thread_ports_race.c78 mach_port_deallocate(mach_task_self(), threadList[i]); in test_race()
81 vm_deallocate(mach_task_self(), (vm_address_t)threadList, in test_race()
88 if (task != mach_task_self()) { in test_race()
89 mach_port_deallocate(mach_task_self(), task); in test_race()
134 kern_return_t kr = task_for_pid(mach_task_self(), pid, &tp); in fork_child_test()
137 int rc = task_read_for_pid(mach_task_self(), pid, &tp); in fork_child_test()
158 local_test(true, mach_task_self());
160 kr = task_get_special_port(mach_task_self(), TASK_READ_PORT, &tp);
/xnu-12377.81.4/tests/vm/
H A Dvm_unaligned_copy_switch_race.c39 kr = vm_map(mach_task_self(), in switcheroo_thread()
54 kr = vm_map(mach_task_self(), in switcheroo_thread()
101 kr = vm_allocate(mach_task_self(),
109 kr = vm_protect(mach_task_self(),
117 kr = mach_make_memory_entry_64(mach_task_self(),
126 kr = mach_make_memory_entry_64(mach_task_self(),
136 kr = vm_map(mach_task_self(),
149 kr = vm_map(mach_task_self(),
163 kr = vm_allocate(mach_task_self(),
177 kr = vm_allocate(mach_task_self(),
[all …]
H A Dvm_test_shreg_ro.c72 kr = mach_vm_region_recurse(mach_task_self(), in find_nested_read_only_mapping()
148 kr = mach_vm_region_recurse(mach_task_self(),
165 kr = mach_vm_allocate(mach_task_self(),
175 kr = mach_vm_region_recurse(mach_task_self(),
192 kr = mach_vm_remap(mach_task_self(),
197 mach_task_self(),
209 kr = mach_vm_region_recurse(mach_task_self(),
226 kr = mach_vm_protect(mach_task_self(),
236 kr = mach_vm_region_recurse(mach_task_self(),
256 kr = mach_vm_protect(mach_task_self(),
[all …]
H A Dvm_memory_entry_parent_test.c44 kr = mach_vm_allocate(mach_task_self(), &src_addr, size, VM_FLAGS_ANYWHERE);
58 kr = mach_make_memory_entry_64(mach_task_self(),
73 kr = mach_make_memory_entry_64(mach_task_self(),
85 kr = mach_vm_map(mach_task_self(),
129 kr = mach_vm_map(mach_task_self(), &alloced_addr, KB16, 0, VM_FLAGS_ANYWHERE,
141 kr = mach_make_memory_entry_64(mach_task_self(), &entry_size, alloced_addr,
155 kern_return_t kr = mach_vm_allocate(mach_task_self(), &alloced_addr, KB16, VM_FLAGS_ANYWHERE);
160 kr = mach_make_memory_entry_64(mach_task_self(), &parent_size, alloced_addr,
170 kr = mach_make_memory_entry_64(mach_task_self(), &entry_size, alloced_addr,
196 kr = mach_make_memory_entry_64(mach_task_self(), &entry_size, 0,
[all …]
H A Dvm_unaligned_copy_protection_race.c36 kr = vm_protect(mach_task_self(), in protect_thread()
45 kr = vm_protect(mach_task_self(), in protect_thread()
97 kr = vm_allocate(mach_task_self(),
104 kr = vm_allocate(mach_task_self(),
114 kr = vm_allocate(mach_task_self(),
124 kr = vm_read(mach_task_self(),
132 kr = vm_allocate(mach_task_self(),
144 kr = vm_read_overwrite(mach_task_self(),
173 vm_deallocate(mach_task_self(), ctx->e0, ctx->obj_size);
175 vm_deallocate(mach_task_self(), e1, ctx->obj_size);
[all …]
H A Dvm_test_linkedit_permanent.c72 kr = mach_vm_region_recurse(mach_task_self(), in find_first_read_only_mapping()
152 kr = mach_vm_region_recurse(mach_task_self(),
169 kr = mach_vm_allocate(mach_task_self(),
178 kr = mach_vm_write(mach_task_self(),
188 kr = mach_vm_region_recurse(mach_task_self(),
205 kr = mach_vm_allocate(mach_task_self(),
215 kr = mach_vm_region_recurse(mach_task_self(),
232 kr = mach_vm_remap(mach_task_self(),
237 mach_task_self(),
249 kr = mach_vm_region_recurse(mach_task_self(),
[all …]
/xnu-12377.81.4/tools/tests/superpages/
H A Dtestsp.c196 …kr = mach_vm_allocate(mach_task_self(), &global_addr, global_size, VM_FLAGS_ANYWHERE | VM_FLAGS_SU… in test_allocate()
228 kr = mach_vm_deallocate(mach_task_self(), global_addr, global_size); in test_deallocate()
255 …kr = mach_vm_allocate(mach_task_self(), &addr, size, VM_FLAGS_ANYWHERE | VM_FLAGS_SUPERPAGE_SIZE_A… in test_allocate_size_any()
265 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_allocate_size_any()
292 kr = mach_vm_allocate(mach_task_self(), &addr, size, VM_FLAGS_SUPERPAGE_SIZE_2MB); in test_allocatefixed()
302 kr = mach_vm_deallocate(mach_task_self(), addr, size); in test_allocatefixed()
324 kr = mach_vm_allocate(mach_task_self(), &addr, size, VM_FLAGS_SUPERPAGE_SIZE_2MB); in test_allocateunalignedfixed()
345 kr = mach_vm_allocate(mach_task_self(), &addr, size, VM_FLAGS_SUPERPAGE_SIZE_2MB); in test_allocateoddsize()
367 …kr = mach_vm_allocate(mach_task_self(), &addr, size, VM_FLAGS_ANYWHERE | VM_FLAGS_SUPERPAGE_SIZE_2… in test_deallocatesubpage()
371 kr = mach_vm_deallocate(mach_task_self(), addr + PAGE_SIZE, size); in test_deallocatesubpage()
[all …]
/xnu-12377.81.4/libsyscall/mach/
H A Dmach_right.c70 kr = mach_port_construct(mach_task_self(), &opts, ctx, &p); in mach_right_recv_construct()
95 kr = mach_port_destruct(mach_task_self(), r.mrr_name, srd, ctx); in mach_right_recv_destruct()
104 kr = mach_port_insert_right(mach_task_self(), r.mrr_name, r.mrr_name, in mach_right_send_create()
117 kr = mach_port_mod_refs(mach_task_self(), s.mrs_name, in mach_right_send_retain()
142 kr = mach_port_mod_refs(mach_task_self(), s.mrs_name, in mach_right_send_release()
148 kr = mach_port_mod_refs(mach_task_self(), s.mrs_name, in mach_right_send_release()
162 kern_return_t kr = mach_port_extract_right(mach_task_self(), r.mrr_name, in mach_right_send_once_create()
174 kr = mach_port_mod_refs(mach_task_self(), so.mrso_name, in mach_right_send_once_consume()
180 kr = mach_port_mod_refs(mach_task_self(), so.mrso_name, in mach_right_send_once_consume()

123456789