thread.h |
Includes: |
<mach/kern_return.h> <mach/mach_types.h> <mach/message.h> <mach/boolean.h> <mach/vm_param.h> <mach/thread_info.h> <mach/thread_status.h> <mach/exception_types.h> <kern/kern_types.h> <sys/cdefs.h> |
Use the links in the table of contents to the left to access the documentation.
Create a kernel thread.
kernel_thread_start |
Create a kernel thread.
extern kern_return_t kernel_thread_start( thread_continue_t continuation, void *parameter, thread_t *new_thread);
continuation
A C-function pointer where the thread will begin execution.
parameter
Caller specified data to be passed to the new thread.
new_thread
Reference to the new thread is returned in this parameter.
Returns KERN_SUCCESS on success or an appropriate kernel code type.
This function takes three input parameters, namely reference to the function that the thread should execute, caller specified data and a reference which is used to return the newly created kernel thread. The function returns KERN_SUCCESS on success or an appropriate kernel code type indicating the error. It may be noted that the caller is responsible for explicitly releasing the reference to the created thread when no longer needed. This should be done by calling thread_deallocate(new_thread).
Last Updated: 2010-07-29