pthread_once man page on BSDOS

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

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

NAME
     pthread_once - execute a function at most once

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
     This interface is defined by IEEE Std1003.1c (``POSIX'').

     The pthread_once() function causes the the function passed as
     init_routine to be executed at most one time in the life of a program.
     The initialization state is maintained in once_control. The behavior of
     pthread_once() is undefined if once_control has automatic storage class
     or is not initialized with PTHREAD_ONCE_INIT.

     The intent of pthread_once() is that it be used to initialize a routine
     package dynamically at run time in a thread-safe manner.  Pthread_once()
     performs sufficient locking to guarantee that at most one thread executes
     init_routine.

RETURN VALUES
     The pthread_once() function returns 0 upon successful completion.	If an
     error occurs, a non-zero error value is returned.

ERRORS
     The pthread_once function may fail and return the following error:

     [EINVAL]	   An invalid parameter was passed as an argument to
		   pthread_once().

SEE ALSO
     pthreads(3),  pthread_create(3),  pthread_exit(3)

STANDARDS
     The pthread_once function conforms to IEEE Std1003.1c (``POSIX'').

HISTORY
     The pthread_once function first appeared in BSD/OS 3.0.

4th Berkeley Distribution	 June 3, 1996				     1
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

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