1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 20:47:45 +00:00

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

View file

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