diff options
author | 2001-08-18 22:19:49 +0000 | |
---|---|---|
committer | 2001-08-18 22:19:49 +0000 | |
commit | 0320f7a58fdaefd83d8f8f6a69c7ba236c5d3949 (patch) | |
tree | 2677ae4cfe00ed680fdafc12bd4087ceb401126b /lib/libpthread/man | |
parent | Deal with snprintf returns properly (diff) | |
download | wireguard-openbsd-0320f7a58fdaefd83d8f8f6a69c7ba236c5d3949.tar.xz wireguard-openbsd-0320f7a58fdaefd83d8f8f6a69c7ba236c5d3949.zip |
Describe the pthread_main_np() function
Diffstat (limited to 'lib/libpthread/man')
-rw-r--r-- | lib/libpthread/man/pthread_main_np.3 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/libpthread/man/pthread_main_np.3 b/lib/libpthread/man/pthread_main_np.3 new file mode 100644 index 00000000000..8d779360ee9 --- /dev/null +++ b/lib/libpthread/man/pthread_main_np.3 @@ -0,0 +1,42 @@ +.\" $OpenBSD: pthread_main_np.3,v 1.1 2001/08/18 22:19:49 pvalchev Exp $ +.\" +.\" Copyright (c) 2001 Peter Valchev <pvalchev@openbsd.org>. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted. +.\" +.Dd August 17, 2001 +.Dt PTHREAD_MAIN_NP 3 +.Os +.Sh NAME +.Nm pthread_main_np +.Nd identify the main thread +.Sh SYNOPSIS +.Fd #include <pthread.h> +.Fd #include <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 +.Sh SEE ALSO +.Xr pthreads 3 , +.Xr pthreads_self 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. |