*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: thr_self | Section: 2 | Source: FreeBSD | File: thr_self.2.gz
THR_SELF(2) FreeBSD System Calls Manual THR_SELF(2) NAME thr_self - return thread identifier for the calling thread LIBRARY Standard C Library (libc, -lc) SYNOPSIS #include <sys/thr.h> int thr_self(long *id); DESCRIPTION The thr_self() system call stores the system-wide thread identifier for the current kernel-scheduled thread in the variable pointed by the argument id. The thread identifier is an integer in the range from PID_MAX + 2 (100001) to INT_MAX. The thread identifier is guaranteed to be unique at any given time, for each running thread in the system. After the thread exits, the identifier may be reused. RETURN VALUES If successful, thr_self() will return zero, otherwise -1 is returned, and errno is set to indicate the error. ERRORS The thr_self() operation may return the following errors: [EFAULT] The memory pointed to by the id argument is not valid. SEE ALSO _umtx_op(2), thr_exit(2), thr_kill(2), thr_kill2(2), thr_new(2), thr_set_name(2), pthread_getthreadid_np(3), pthread_self(3) STANDARDS The thr_self() system call is non-standard and is used by 1:1 Threading Library (libthr, -lthr) to implement IEEE Std 1003.1-2001 ("POSIX.1") pthread(3) functionality. HISTORY The thr_self() system call first appeared in FreeBSD 5.2. FreeBSD 14.1-RELEASE-p8 May 5, 2020 FreeBSD 14.1-RELEASE-p8

Navigation Options