*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: pthread_once | Section: 3 | Source: NetBSD | File: pthread_once.3
PTHREAD_ONCE(3) FreeBSD Library Functions Manual PTHREAD_ONCE(3) NAME pthread_once - dynamic package initialization LIBRARY POSIX Threads Library (libpthread, -lpthread) SYNOPSIS #include <pthread.h> int pthread_once(pthread_once_t *once_control, void (*init_routine)(void)); pthread_once_t once_control = PTHREAD_ONCE_INIT; DESCRIPTION The first call to pthread_once() by any thread in a process, with a given once_control, will call the init_routine() with no arguments. Subsequent calls to pthread_once() with the same once_control will not call the init_routine() On return from pthread_once(), it is guaranteed that init_routine() has completed. The once_control parameter is used to determine whether the associated initialization routine has been called. The function pthread_once() is not a cancellation point. However, if init_routine() is a cancellation point and is cancelled, the effect on once_control is as if pthread_once() was never called. The constant PTHREAD_ONCE_INIT initializes the static once synchronization control structure once_control to be used with pthread_once(). The behavior of pthread_once() is undefined if once_control has automatic storage duration or is not initialized by PTHREAD_ONCE_INIT. RETURN VALUES If successful, the pthread_once() function will return zero. Otherwise an error number will be returned to indicate the error. ERRORS None. STANDARDS The function conforms to IEEE Std 1003.1-2001 ("POSIX.1"). FreeBSD 14.1-RELEASE-p8 July 9, 2010 FreeBSD 14.1-RELEASE-p8

Navigation Options