summaryrefslogtreecommitdiff
path: root/static/openbsd/man3/pthread_main_np.3
blob: 21addc5ab45e5b61ec683ea6afa93cfada1ad82b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
.\" $OpenBSD: pthread_main_np.3,v 1.7 2025/06/07 00:16:52 schwarze Exp $
.\"
.\" Peter Valchev <pvalchev@openbsd.org> Public Domain, 2001
.\"
.Dd $Mdocdate: June 7 2025 $
.Dt PTHREAD_MAIN_NP 3
.Os
.Sh NAME
.Nm pthread_main_np
.Nd identify the main thread
.Sh SYNOPSIS
.Lb libpthread
.In pthread.h
.In pthread_np.h
.Ft int
.Fn pthread_main_np "void"
.Sh DESCRIPTION
The
.Fn pthread_main_np
function identifies the main thread.
.Sh RETURN VALUES
The
.Fn pthread_main_np
function returns:
.Bl -tag -width hrmf
.It 1
if the calling thread is the main thread
.It 0
if the calling thread is not the main thread
.It -1
if the thread initialization has not completed
.El
.Sh SEE ALSO
.Xr pthread_self 3 ,
.Xr pthreads 3
.Sh STANDARDS
The
.Fn pthread_main_np
function is non-portable and may not be supported with the above
semantics on other POSIX systems.