X-Git-Url: https://git.saurik.com/apple/xnu.git/blobdiff_plain/9bccf70c0258c7cac2dcb80011b2a964d884c552..39236c6e673c41db228275375ab7fdb0f837b292:/osfmk/man/thread_create.html diff --git a/osfmk/man/thread_create.html b/osfmk/man/thread_create.html old mode 100755 new mode 100644 index 135b1c5bd..91ec23a76 --- a/osfmk/man/thread_create.html +++ b/osfmk/man/thread_create.html @@ -1 +1,58 @@ -

thread_create


Function - Create a thread within a task.

SYNOPSIS

kern_return_t   thread_create
                (task_t                             parent_task,
                 thread_act_t                      child_thread);

PARAMETERS

parent_task
[in task send right] The port for the task that is to contain the new thread.

child_thread
[out thread send right] The kernel-assigned name for the new thread.

DESCRIPTION

The thread_create function creates a new thread within parent_task. The new thread has a suspend count of one and no processor state.

The new thread holds a send right for its thread kernel port. A send right for the thread's kernel port is also returned to the calling task or thread in child_thread. The new thread's exception ports are set to MACH_PORT_NULL.

NOTES

To get a new thread running, first use thread_set_state to set a processor state for the thread. Then, use thread_resume to schedule the thread for execution. Alternately, use thread_create_running.

RETURN VALUES

Only generic errors apply.

RELATED INFORMATION

Functions: task_create, task_threads, thread_get_special_port, thread_get_state, thread_resume, thread_set_special_port, thread_set_state, thread_suspend, thread_terminate, thread_create_running. \ No newline at end of file +

thread_create

+
+

+Function - Create a thread within a task. +

SYNOPSIS

+
+kern_return_t   thread_create
+                (task_t                             parent_task,
+                 thread_act_t                      child_thread);
+
+

PARAMETERS

+
+

+

parent_task +
+[in task send right] +The port for the task that is to contain the new +thread. +

+

child_thread +
+[out thread send right] +The kernel-assigned name for the new thread. +
+

DESCRIPTION

+

+The thread_create function creates a new thread within +parent_task. The new thread has a suspend count of one and +no processor state. +

+The new thread holds a send right for its thread kernel port. +A send right for the +thread's kernel port is also returned to the calling task or +thread in child_thread. +The new thread's exception ports are set to MACH_PORT_NULL. +

NOTES

+

+To get a new thread running, first use thread_set_state +to set a processor state +for the thread. Then, use thread_resume to schedule +the thread for execution. +Alternately, use thread_create_running. +

RETURN VALUES

+

+Only generic errors apply. +

RELATED INFORMATION

+

+Functions: +task_create, +task_threads, +thread_get_special_port, +thread_get_state, +thread_resume, +thread_set_special_port, +thread_set_state, +thread_suspend, +thread_terminate, +thread_create_running.