osf1 man page for kernel_thread_w_arg

Query: kernel_thread_w_arg

OS: osf1

Section: 9r

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

kernel_thread_w_arg(9r) 												   kernel_thread_w_arg(9r)

NAME
kernel_thread_w_arg - General: Starts a kernel thread with a calling argument passed in
SYNOPSIS
thread_t kernel_thread_w_arg( task_t task, void (*start) (void), void* argument );
ARGUMENTS
Specifies a pointer to a task structure. This pointer identifies the task in which the kernel_thread_w_arg routine starts the newly cre- ated kernel thread. Specifies a pointer to a routine that is the entry point for the newly created kernel thread. Specifies the argument that kernel_thread_w_arg passes to the entry point specified in start.
DESCRIPTION
The kernel_thread_w_arg routine creates and starts a kernel thread in the specified task at the specified entry point with a specified argument. The kernel_thread_w_arg routine passes the specified argument to the newly created kernel thread. The kernel_thread_w_arg rou- tine creates and starts a kernel thread with timeshare scheduling. A kernel thread created with timeshare scheduling means that its prior- ity degrades if it consumes an inordinate amount of CPU resources. A kernel module should call kernel_thread_w_arg only for long-running tasks. A kernel module should always attach a kernel thread to the ``first task.''
NOTES
This routine is actually a convenience wrapper for the thread_create routine (which creates the kernel thread) and the thread_start routine (which starts the newly created kernel thread). The kernel_thread_w_arg routine behaves identically to kernel_isrthread except that with kernel_thread_w_arg you can pass an argument to the entry point for the newly created kernel thread.
RETURN VALUES
Upon successful completion, kernel_thread_w_arg returns a pointer to the thread structure associated with the kernel thread started at the specified entry point. Kernel modules can use this pointer as a handle to a specific kernel thread in calls to other kernel threads-related routines.
SEE ALSO
Routines: kernel_isrthread(9r), thread_create(9r), thread_start(9r) Data Structures: task(9s), thread(9s) kernel_thread_w_arg(9r)
Related Man Pages
cpu_throw(9) - debian
mi_switch(9) - debian
kernel_isrthread(9r) - osf1
thread_terminate(9r) - osf1
cpu_switch(9) - netbsd
Similar Topics in the Unix Linux Community
Relation between kernel & weblogic thread
On how to select the right tool for a given task
Passing socket struct between kernel threads - module programming
Kcryptd - Which kernel supports MultiThread
How do i start a new thread with my android phone?