THREAD_SELF(3T) BSD THREAD_SELF(3T)
NAME
thread_self - return thread id
SYNOPSIS
include <apollo/thread.h>
thread_t thread_self(void)
DESCRIPTION
thread_self returns the thread id of the currently running thread.
The data structures is defined as follows:
thread_t
The basic thread id. This is a black box value that is not
significant outside the thread system. It is guaranteed that no two
active threads on a node will have the same thread id.
SEE ALSO
thread_create(3T), thread_terminate(3T), thread_suspend(3T),
thread_resume(3T), thread_abort(3T), thread_info(3T), thread_state(3T),
thread_set_priority(3T), thread_handle_signals(3T), thread_inhibit(3T),
thread_cleanup(3T), thread_startup(3T), threadp_init(3T),
threadp_set(3T), threadp_get(3T).
Section (3P) pthread calls (IEEE P1003.4a) calls
Domain System Software Release Notes, Software Release 10.4
NOTES
This call is part of the low level Domain/OS Pthread interface. Most of
these calls come directly from the Mach thread interface. Except as
noted, they work exactly like the equivalent Mach call; they work between
processes (the thread id is unique for a node) if the calling process has
the appropriate rights relative to the target process.
This call is provided solely for compatibility with the Mach operating
system. New applications should use the Pthread interface instead.