446 B
446 B
Once
This is a simple abstraction for a once which will choose from a few different back-ends:
- If C11 threads are available, use
call_once(). - On Windows, use InitOnceExecuteOnce()
- If
PTHREAD_ONCE_INITis defined (i.e., if<pthread.h>has been included prior to includingonce.h), usepthread_once(). - Use
[atomic.h](../atomic).