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