]> pd.if.org Git - pdclib/blobdiff - opt/nothread/call_once.c
opt nothread: Fix call_once to match recent changes to the implementation method
[pdclib] / opt / nothread / call_once.c
index 83201708b401fecc38e8a3bb0ffad8df89a99014..cce9a499493ad3c4eb80e70b34a37b34299842e9 100644 (file)
@@ -3,9 +3,9 @@
 \r
 void _PDCLIB_call_once(_PDCLIB_once_flag *flag, void (*func)(void))\r
 {\r
-       if(*flag != _PDCLIB_ONCE_FLAG_DONE) {\r
+       if(!_PDCLIB_ONCE_FLAG_IS_DONE(flag)) {\r
                func();\r
-               *flag = _PDCLIB_ONCE_FLAG_DONE;\r
+               *flag = 1;\r
        }\r
 }\r
 #endif\r