X-Git-Url: https://pd.if.org/git/?a=blobdiff_plain;f=includes%2Fthreads.h;h=4549883cd5e2463022e21734ef94e5029f6e566a;hb=71138f702f36adace73415a67d0e2e5707a48ba2;hp=c9e3b07f24b656a1730f22f7349f3feb656791eb;hpb=9087cd0b1dae127e767f534646e080d4a63b0ca9;p=pdclib diff --git a/includes/threads.h b/includes/threads.h index c9e3b07..4549883 100644 --- a/includes/threads.h +++ b/includes/threads.h @@ -25,10 +25,10 @@ enum { }; #define ONCE_FLAG_INIT _PDCLIB_ONCE_FLAG_INIT -#if defined(_PDCLIB_ONCE_FLAG_DONE) +#if defined(_PDCLIB_ONCE_FLAG_IS_DONE) static inline void call_once(once_flag *flag, void (*func)(void)) { - if(*flag != _PDCLIB_ONCE_FLAG_DONE) { + if(_PDCLIB_ONCE_FLAG_IS_DONE(flag)) { _PDCLIB_call_once(flag, func); } }