]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
htl: Make __PTHREAD_ONCE_INIT more flexible
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 13 Jan 2020 21:17:44 +0000 (21:17 +0000)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 9 Feb 2020 12:56:48 +0000 (13:56 +0100)
by moving its (struct __pthread_once) cast into PTHREAD_ONCE_INIT.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
sysdeps/htl/bits/types/struct___pthread_once.h
sysdeps/htl/pthread.h

index 31a0c0817b2022ea698a455145e2f50ab875e46b..a6b6db708cfd0eca38c7e76bedf5da423d8f71a8 100644 (file)
@@ -28,6 +28,6 @@ struct __pthread_once
 };
 
 #define __PTHREAD_ONCE_INIT \
-       (struct __pthread_once) { 0, __PTHREAD_SPIN_LOCK_INITIALIZER }
+       0, __PTHREAD_SPIN_LOCK_INITIALIZER
 
 #endif /* bits/types/struct___pthread_once.h */
index 3216860493d7f1f0c85ae0ec5ee6ce3194aaebf7..38c61e8da323ff9ef41b29688b5f32ac8ad59f7f 100644 (file)
@@ -802,7 +802,7 @@ extern int pthread_setspecific (pthread_key_t __key, const void *__value)
 
 #include <bits/types/struct___pthread_once.h>
 
-#define PTHREAD_ONCE_INIT __PTHREAD_ONCE_INIT
+#define PTHREAD_ONCE_INIT (struct __pthread_once) { __PTHREAD_ONCE_INIT }
 
 /* Call INIT_ROUTINE if this function has never been called with
    *ONCE_CONTROL, otherwise do nothing.  */