Function - Return the target task's list of threads.
kern_return_t task_threads (task_t task, thread_act_port_array_t thread_list, mach_msg_type_number_t* thread_count);
The task_threads function returns a list of the threads within task. The calling task or thread also receives a send right to the kernel port for each listed thread.
Only generic errors apply.
Functions: thread_create, thread_terminate, thread_suspend.