pthread_once man page on MirBSD

Man page or keyword search:  
man Server   6113 pages
apropos Keyword Search (all sections)
Output format
MirBSD logo
[printable version]

PTHREAD_ONCE(3)		   BSD Programmer's Manual	       PTHREAD_ONCE(3)

NAME
     pthread_once - dynamic package initialization

SYNOPSIS
     #include <pthread.h>

     pthread_once_t once_control = PTHREAD_ONCE_INIT;

     int
     pthread_once(pthread_once_t *once_control, void (*init_routine)(void));

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 is defined in the header file <pthread.h>.

     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
     pthread_once() conforms to ISO/IEC 9945-1:1996 ("POSIX").

MirOS BSD #10-current		April 4, 1996				     1
[top]

List of man pages available for MirBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net