Index Index for
Section 9s
Index Alphabetical
listing for T
Bottom of page Bottom of
page

thread(9s)

NAME

thread - General: Contains kernel threads-related information

SYNOPSIS

___________________________ Member Name Data Type ___________________________ wait_result kern_return_t ___________________________

MEMBERS

wait_result 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 current_thread routine) to check for the result of the wait. The values associated with the wait_result member have the following meanings: THREAD_AWAKENED The result of the assert wait is a normal wakeup. THREAD_INTERRUPTED The wait condition was interrupted by the clear_wait routine. THREAD_TIMED_OUT The specified timeout has expired. THREAD_SHOULD_TERMINATE The result of the assert wait is that the current kernel thread should terminate. THREAD_RESTART 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 referenced and manipulated by the operating system and not by the user of kernel threads.

FILES

<kern/thread.h>

SEE ALSO

Routines: clear_wait(9r), current_thread(9r), thread_block(9r), thread_set_timeout(9r), thread_wakeup(9r), thread_wakeup_one(9r)

Index Index for
Section 9s
Index Alphabetical
listing for T
Top of page Top of
page