icon Top 9 categories map      RocketAware > man pages >

pthread_once(3)

Tips: Browse or Search all pages for efficient awareness of more than 6000 of the most popular reusable and open source applications, functions, libraries, and FAQs.


The "RKT couplings" below include links to source code, updates, additional information, advice, FAQs, and overviews.


Home

Search all pages


Subjects

By activity
Professions, Sciences, Humanities, Business, ...

User Interface
Text-based, GUI, Audio, Video, Keyboards, Mouse, Images,...

Text Strings
Conversions, tests, processing, manipulation,...

Math
Integer, Floating point, Matrix, Statistics, Boolean, ...

Processing
Algorithms, Memory, Process control, Debugging, ...

Stored Data
Data storage, Integrity, Encryption, Compression, ...

Communications
Networks, protocols, Interprocess, Remote, Client Server, ...

Hard World
Timing, Calendar and Clock, Audio, Video, Printer, Controls...

File System
Management, Filtering, File & Directory access, Viewers, ...

    

RocketLink!--> Man page versions:



PTHREAD_ONCE(3)           OpenBSD 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 de-
     termine 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 by header <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 ANSI/IEEE (``POSIX'') Std
     1003.1 Second Edition 1996-07-12.

OpenBSD 2.6                      April 4, 1996                               1

Source: OpenBSD 2.6 man pages. Copyright: Portions are copyrighted by BERKELEY
SOFTWARE DESIGN, INC., The Regents of the University of California, Massachusetts
Institute of Technology, Free Software Foundation, FreeBSD Inc., and others.



(Corrections, notes, and links courtesy of RocketAware.com)


[Detailed Topics]
FreeBSD Sources for pthread_once(3) functions


[Overview Topics]



RocketLink!--> Man page versions:






Rapid-Links: Search | About | Comments | Submit Path: RocketAware > man pages > pthread_once.3/
RocketAware.com is a service of Mib Software
Copyright 1999, Forrest J. Cavalier III. All Rights Reserved.
We welcome submissions and comments