Lines Matching refs:task
46 error_t read_data (task_t task, vm_address_t *ourpage, vm_size_t *size) in ptrace()
51 err = __vm_read (task, trunc_page (addr), *size, ourpage, size); in ptrace()
56 error_t fetch_user_thread (task_t task, thread_t *thread) in ptrace()
60 error_t err = __task_threads (task, &threads, &nthreads); in ptrace()
78 task_t task = __pid2task (pid); in ptrace() local
80 if (task == MACH_PORT_NULL) in ptrace()
82 err = fetch_user_thread (task, &thread); in ptrace()
83 __mach_port_deallocate (__mach_task_self (), task); in ptrace()
109 task_t task = __pid2task (pid); in ptrace() local
110 if (task == MACH_PORT_NULL) in ptrace()
113 err = __task_terminate (task); in ptrace()
120 err = fetch_user_thread (task, &thread); in ptrace()
146 0, 0, __msg_sig_post_untraced (msgport, data, 0, task)); in ptrace()
148 __mach_port_deallocate (__mach_task_self (), task); in ptrace()
174 task_t task = __pid2task (pid); in ptrace() local
175 if (task == MACH_PORT_NULL) in ptrace()
180 err = __msg_set_init_int (msgport, task, INIT_TRACEMASK, in ptrace()
187 err = __msg_sig_post (msgport, SIGSTOP, 0, task); in ptrace()
190 err = __msg_sig_post_untraced (msgport, 0, 0, task); in ptrace()
194 __mach_port_deallocate (__mach_task_self (), task); in ptrace()
211 task_t task = __pid2task (pid); in ptrace() local
212 if (task == MACH_PORT_NULL) in ptrace()
217 err = read_data (task, &ourpage, &size); in ptrace()
218 __mach_port_deallocate (__mach_task_self (), task); in ptrace()
280 task_t task = __pid2task (pid); in ptrace() local
281 if (task == MACH_PORT_NULL) in ptrace()
286 err = read_data (task, &ourpage, &size); in ptrace()
293 err = __vm_write (task, trunc_page (addr), ourpage, size); in ptrace()
297 __mach_port_deallocate (__mach_task_self (), task); in ptrace()
313 task_t task = __pid2task (pid); in ptrace() local
314 if (task == MACH_PORT_NULL) in ptrace()
327 err = read_data (task, &ourpage, &size); in ptrace()
328 __mach_port_deallocate (__mach_task_self (), task); in ptrace()
349 task_t task = __pid2task (pid); in ptrace() local
350 if (task == MACH_PORT_NULL) in ptrace()
365 err = read_data (task, &ourpage, &size); in ptrace()
374 err = __vm_write (task, trunc_page (addr), ourpage, size); in ptrace()
375 __mach_port_deallocate (__mach_task_self (), task); in ptrace()