Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

thread(9s) [osf1 man page]

thread(9s)																thread(9s)

NAME
thread - General: Contains kernel threads-related information SYNOPSIS
---------------------------- Member Name Data Type ---------------------------- wait_result kern_return_t ---------------------------- MEMBERS
Specifies the outcome of the wait. The kernel can set this member to one of the following values: THREAD_AWAKENED, THREAD_INTERRUPTED, THREAD_TIMED_OUT, THREAD_SHOULD_TERMINATE, and THREAD_RESTART. DESCRIPTION
The thread data structure contains kernel threads-related information. Kernel modules typically use the wait_result member (with the cur- rent_thread routine) to check for the result of the wait. The values associated with the wait_result member have the following meanings: The result of the assert wait is a normal wakeup. The wait condition was interrupted by the clear_wait routine. The specified timeout has expired. The result of the assert wait is that the current kernel thread should terminate. The current kernel thread should be restarted. NOTES
The header file <thread.h> shows a typedef statement that assigns the alternate name thread_t for a pointer to the thread data structure. Many of the kernel threads-related routines operate on these pointers to thread data structures. The thread data structure is an opaque data structure; that is, all of its associated members (except for the wait_result member) are ref- erenced and manipulated by the operating system and not by the user of kernel threads. FILES
SEE ALSO
Routines: clear_wait(9r), current_thread(9r), thread_block(9r), thread_set_timeout(9r), thread_wakeup(9r), thread_wakeup_one(9r) thread(9s)

Check Out this Related Man Page

kernel_isrthread(9r)													      kernel_isrthread(9r)

NAME
kernel_isrthread - General: Starts a fixed priority kernel thread dedicated to interrupt service SYNOPSIS
thread_t kernel_isrthread( task_t task, void (*start) (void), int pri ); ARGUMENTS
Specifies a pointer to a task structure. This pointer identifies the task in which the kernel_isrthread routine starts the newly created kernel thread dedicated to interrupt service handling. Specifies a pointer to an routine that is the entry point for the newly created kernel thread. Specifies the scheduling priority level for the newly created kernel thread. See the DESCRIPTION section for the priority usage table that describes the possible scheduling priorities. DESCRIPTION
The kernel_isrthread routine creates and starts a kernel thread at the specified entry point. This kernel thread handles only interrupt service requests in the specified task and at the specified priority level. A kernel module should always attach a kernel thread to the ``first task.'' The following priority usage table describes the possible scheduling priorities. The first column shows a range of priorities. The second column shows an associated scheduling priority constant defined in <src/kernel/kern/sched.h> (if applicable). The third column describes the usage of the priority ranges. To specify a scheduling priority of 38, you pass the constant BASEPRI_SYSTEM. To specify a scheduling priority of 33, you can pass the following: BASEPRI_HIGHEST + 1. -------------------------------------------------------------- Priority Constant Usage -------------------------------------------------------------- 0--31 N/A Realtime kernel threads 32--38 BASEPRI_HIGHEST -- Operating system kernel BASEPRI_SYSTEM threads 44--64 BASEPRI_USER -- User kernel threads BASEPRI_LOWEST -------------------------------------------------------------- RETURN VALUES
Upon successful completion, kernel_isrthread 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_thread_w_arg(9r) Data Structures: task(9s), thread(9s) kernel_isrthread(9r)
Man Page