1.\" $OpenBSD: pthread_main_np.3,v 1.1 2001/08/18 22:19:49 pvalchev Exp $ 2.\" 3.\" Copyright (c) 2001 Peter Valchev <pvalchev@openbsd.org>. 4.\" All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted. 8.\" 9.Dd August 17, 2001 10.Dt PTHREAD_MAIN_NP 3 11.Os 12.Sh NAME 13.Nm pthread_main_np 14.Nd identify the main thread 15.Sh SYNOPSIS 16.Fd #include <pthread.h> 17.Fd #include <pthread_np.h> 18.Ft int 19.Fn pthread_main_np "void" 20.Sh DESCRIPTION 21The 22.Fn pthread_main_np 23function identifies the main thread. 24.Sh RETURN VALUES 25The 26.Fn pthread_main_np 27function returns: 28.Bl -tag -width hrmf 29.It 1 30if the calling thread is the main thread 31.It 0 32if the calling thread is not the main thread 33.It -1 34if the thread initialization has not completed 35.Sh SEE ALSO 36.Xr pthreads 3 , 37.Xr pthreads_self 3 38.Sh STANDARDS 39The 40.Fn pthread_main_np 41function is non-portable and may not be supported with the above 42semantics on other POSIX systems. 43