*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> pthread_once (3p)              
Title
Content
Arch
Section
 

Contents


pthread_once(3P)					      pthread_once(3P)


NAME    [Toc]    [Back]

     pthread_once - thread-safe	initialization

C SYNOPSIS    [Toc]    [Back]

     #include <pthread.h>

     int pthread_once(pthread_once_t *once, void (*init)(void));

DESCRIPTION    [Toc]    [Back]

     The pthread_once()	function ensures that the function init	is called
     exactly once for all callers using	the once initialization	variable.
     This variable is initialized with the constant PTHREAD_ONCE_INIT.	While
     init is being executed all	callers	of pthread_once() will wait.

     If	a thread is cancelled while executing the init function	[see
     pthread_setcancelstate()],	then pthread_once() will permit	another	thread
     (possibly waiting)	to make	the call.

DIAGNOSTICS    [Toc]    [Back]

     There are no errors for pthread_once.

SEE ALSO    [Toc]    [Back]

      
      
     pthread_setcancelstate(3P).


									PPPPaaaaggggeeee 1111
[ Back ]
 Similar pages
Name OS Title
tis_once Tru64 Calls an initialization routine that can be executed by only one thread, once
sbuf_vprintf FreeBSD safe string formatting
sbuf FreeBSD safe string formatting
sbuf_printf FreeBSD safe string formatting
sbuf_cpy FreeBSD safe string formatting
sbuf_cat FreeBSD safe string formatting
sbuf_setpos FreeBSD safe string formatting
sbuf_clear FreeBSD safe string formatting
sbuf_putc FreeBSD safe string formatting
sbuf_trim FreeBSD safe string formatting
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service