Back to Darwin Xnu

Task Threads

osfmk/man/task_threads.html

latest981 B
Original Source

task_threads


Function - Return the target task's list of threads.

SYNOPSIS

**kern\_return\_t task\_threads**** (task\_t **task,** thread\_act\_port\_array\_t **thread\_list,** mach\_msg\_type\_number\_t\ ***thread\_count** );**

PARAMETERS

task[in task send right] The port for the task for which the thread list is to be returned.

thread_list[out pointer to dynamic array of thread send rights] The returned list of threads within task, in no particular order.

thread_count[out scalar] The returned count of threads in thread_list.

DESCRIPTION

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.

RETURN VALUES

Only generic errors apply.

Functions: thread_create, thread_terminate, thread_suspend.