pthread_main_np(3) - NetBSD Manual Pages

PTHREAD_MAIN_NP(3)      NetBSD Library Functions Manual     PTHREAD_MAIN_NP(3)


NAME
pthread_main_np -- identify the initial thread
LIBRARY
POSIX Threads Library (libpthread, -lpthread)
SYNOPSIS
#include <pthread.h> int pthread_main_np(void);
DESCRIPTION
The pthread_main_np() function identifies the initial (main) thread.
RETURN VALUES
The pthread_main_np() function returns 1 if the calling thread is the main thread, 0 if not, and -1 if threading has not been initialized.
SEE ALSO
pthread(3), pthread_self(3)
STANDARDS
The pthread_main_np() function is a non-standard extension. NetBSD 11.99 April 26, 2026 NetBSD 11.99

Powered by man-cgi (2026-04-06). Maintained for NetBSD by Kimmo Suominen. Based on man-cgi by Panagiotis Christias.