aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/wasi/thread-stub/pthread_once.c
blob: 350342a1ef2aee200f8781408981528debb371de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#include "pthread_impl.h"

int __pthread_once(pthread_once_t *control, void (*init)(void))
{
       if (!*control) {
               init();
               *control = 1;
       }
       return 0;
}

weak_alias(__pthread_once, pthread_once);