LibPthread: Add POSIX spec links for pthread_once API

This commit is contained in:
Brian Gianforcaro 2022-01-07 00:35:05 -08:00 committed by Brian Gianforcaro
parent 800f14298d
commit 29716b9624
Notes: sideshowbarker 2024-07-17 21:30:26 +09:00

View file

@ -17,6 +17,7 @@ enum State : i32 {
PERFORMING_WITH_WAITERS,
};
// https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_once.html
int pthread_once(pthread_once_t* self, void (*callback)(void))
{
auto& state = reinterpret_cast<Atomic<State>&>(*self);