(__libc_once): Set control variable for non-libpthread case to the same value
authordrepper <drepper>
Wed, 5 Feb 2003 09:53:23 +0000 (09:53 +0000)
committerdrepper <drepper>
Wed, 5 Feb 2003 09:53:23 +0000 (09:53 +0000)
the pthread_once function would use.

linuxthreads/sysdeps/pthread/bits/libc-lock.h

index 136b1a8..a9a98c5 100644 (file)
@@ -224,7 +224,7 @@ typedef pthread_key_t __libc_key_t;
       __pthread_once (&(ONCE_CONTROL), (INIT_FUNCTION));                     \
     else if ((ONCE_CONTROL) == PTHREAD_ONCE_INIT) {                          \
       INIT_FUNCTION ();                                                              \
-      (ONCE_CONTROL) = !PTHREAD_ONCE_INIT;                                   \
+      (ONCE_CONTROL) = 2;                                                    \
     }                                                                        \
   } while (0)