GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  PTHREAD_ONCE (3)

NAME

pthread_once - dynamic package initialization

CONTENTS

Library
Synopsis
Description
Return Values
Errors
Standards

LIBRARY


.Lb libpthread

SYNOPSIS


.In 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 by header
.In 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

The pthread_once function conforms to -p1003.1-96.
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.