PTHREAD_ONCE(3) | NetBSD Library Functions Manual | PTHREAD_ONCE(3) |
int
pthread_once(pthread_once_t *once_control, void (*init_routine)(void));
pthread_once_t once_control = PTHREAD_ONCE_INIT;
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 initializes the static once synchronization control structure once_control to be used with pthread_once(). The behavior of pthread_once() is undefined if once_control has automatic storage duration or is not initialized by PTHREAD_ONCE_INIT.
July 9, 2010 | NetBSD 5.99 |