diff options
Diffstat (limited to 'lib/libthr/thread/thr_once.c')
-rw-r--r-- | lib/libthr/thread/thr_once.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/libthr/thread/thr_once.c b/lib/libthr/thread/thr_once.c index eb07066..4f70374 100644 --- a/lib/libthr/thread/thr_once.c +++ b/lib/libthr/thread/thr_once.c @@ -64,6 +64,8 @@ _pthread_once(pthread_once_t *once_control, void (*init_routine) (void)) struct pthread *curthread; int state; + _thr_check_init(); + for (;;) { state = once_control->state; if (state == ONCE_DONE) |