Updated documentation about pthread_once to clarify what happens under
authordrepper <drepper>
Sun, 7 May 2000 23:58:08 +0000 (23:58 +0000)
committerdrepper <drepper>
Sun, 7 May 2000 23:58:08 +0000 (23:58 +0000)
cancellation and forking.

linuxthreads/linuxthreads.texi

index 7a98103..2b3647a 100644 (file)
@@ -1368,6 +1368,15 @@ record that initialization has been performed. Subsequent calls to
 @code{pthread_once} with the same @code{once_control} argument do
 nothing.
 
+If a thread is cancelled while executing @var{init_routine}
+the state of the @var{once_control} variable is reset so that
+a future call to @code{pthread_once} will call the routine again.
+
+If the process forks while one or more threads are executing
+@code{pthread_once} initialization routines, the states of their respective
+@var{once_control} variables will appear to be reset in the child process so
+that if the child calls @code{pthread_once}, the routines will be executed.
+
 @code{pthread_once} always returns 0.
 @end deftypefun