public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-10-28 17:44 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-10-28 17:44 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=130136e00683bb3225137de3a90973dd4a074ef3

commit 130136e00683bb3225137de3a90973dd4a074ef3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2024-04-17 20:10 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-04-17 20:10 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8bf73ae7780e92f2898e04c8815bed15c513ff53

commit 8bf73ae7780e92f2898e04c8815bed15c513ff53
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index 2f0b20029e..459f38129c 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 77b8731c08..451ea12d31 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #if _STACK_GROWS_DOWN

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2024-04-02 15:56 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-04-02 15:56 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2f800d76373730a15860e5e020b477c862383cc9

commit 2f800d76373730a15860e5e020b477c862383cc9
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index 2f0b20029e..459f38129c 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 77b8731c08..451ea12d31 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #if _STACK_GROWS_DOWN

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2024-02-09 17:35 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-02-09 17:35 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0850e37c7f63206f663fd31d4c31237841e2cc6f

commit 0850e37c7f63206f663fd31d4c31237841e2cc6f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index 2f0b20029e..459f38129c 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 77b8731c08..451ea12d31 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #if _STACK_GROWS_DOWN

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2024-02-07 14:10 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-02-07 14:10 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=0b02cb63c84ee0b699268a7c07aa5132b4f225aa

commit 0b02cb63c84ee0b699268a7c07aa5132b4f225aa
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index 2f0b20029e..459f38129c 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 77b8731c08..451ea12d31 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #if _STACK_GROWS_DOWN

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2024-01-29 18:00 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2024-01-29 18:00 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d79b0c933ffc33e43e318bd288c45b925ba5b299

commit d79b0c933ffc33e43e318bd288c45b925ba5b299
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index 2f0b20029e..459f38129c 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 77b8731c08..451ea12d31 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #if _STACK_GROWS_DOWN

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2023-12-21 18:57 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2023-12-21 18:57 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=66f25b3a8b89589dba914d6f247b45b1ba8a7b26

commit 66f25b3a8b89589dba914d6f247b45b1ba8a7b26
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a88ce52cec..614488e7f8 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 87638e9578..c2b206fccb 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2023-09-28 17:55 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2023-09-28 17:55 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=ddd31c56655abcb09182240595aebc66ff13834f

commit ddd31c56655abcb09182240595aebc66ff13834f
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a88ce52cec..614488e7f8 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 87638e9578..c2b206fccb 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2023-08-30 12:39 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2023-08-30 12:39 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=300c67ab5cbe5d71177698f87e28c6db78d69e58

commit 300c67ab5cbe5d71177698f87e28c6db78d69e58
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a88ce52cec..614488e7f8 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 87638e9578..c2b206fccb 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2023-02-09 19:51 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2023-02-09 19:51 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=666ae4f0aed58b7f2b297a9bc0069bbd0ae58de8

commit 666ae4f0aed58b7f2b297a9bc0069bbd0ae58de8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a88ce52cec..614488e7f8 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 87638e9578..c2b206fccb 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-10-04 13:02 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-10-04 13:02 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=bab04df665684b3d4c59793b5d68acf4fdccdded

commit bab04df665684b3d4c59793b5d68acf4fdccdded
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__

^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-06-09 21:23 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 21:23 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=64a2f1527bd18c42ef97c1ff66f585cec3d082da

commit 64a2f1527bd18c42ef97c1ff66f585cec3d082da
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-06-09 13:20 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-06-09 13:20 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=64a2f1527bd18c42ef97c1ff66f585cec3d082da

commit 64a2f1527bd18c42ef97c1ff66f585cec3d082da
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-06-03 14:09 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-06-03 14:09 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9b33e0e251ea20ecc15902d0633cb30585b2b7d3

commit 9b33e0e251ea20ecc15902d0633cb30585b2b7d3
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-05-13 14:23 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-05-13 14:23 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dbc3cb0cd5555307666254a6b2898ac4f052b191

commit dbc3cb0cd5555307666254a6b2898ac4f052b191
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-05-12 19:37 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-05-12 19:37 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=543b859407877411deddec9dd116d2c55a353cb8

commit 543b859407877411deddec9dd116d2c55a353cb8
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-05-10 18:27 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-05-10 18:27 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a0b651800304597ee4827eb9b1bbe2dffc7b6197

commit a0b651800304597ee4827eb9b1bbe2dffc7b6197
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-04-29 14:07 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-04-29 14:07 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=8ab1b03be8a0a7aeb7dfcbd69a62d54f29a4a228

commit 8ab1b03be8a0a7aeb7dfcbd69a62d54f29a4a228
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-04-04 12:58 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-04-04 12:58 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9ea3207de0eb98907c2301f2498dd0ed99a61424

commit 9ea3207de0eb98907c2301f2498dd0ed99a61424
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-03-31 19:10 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-03-31 19:10 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=394174f7a3c53dcd816385c596e04f3cc18c1e11

commit 394174f7a3c53dcd816385c596e04f3cc18c1e11
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics
@ 2022-03-29 20:34 Adhemerval Zanella
  0 siblings, 0 replies; 21+ messages in thread
From: Adhemerval Zanella @ 2022-03-29 20:34 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=dafc53402cf5c1a3476e71278a116e8110928886

commit dafc53402cf5c1a3476e71278a116e8110928886
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Fri Mar 25 11:27:46 2022 -0300

    linux: Adequate tst-clone3 to c11 atomics

Diff:
---
 sysdeps/unix/sysv/linux/tst-clone3-internal.c | 8 +++-----
 sysdeps/unix/sysv/linux/tst-clone3.c          | 8 +++-----
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/sysdeps/unix/sysv/linux/tst-clone3-internal.c b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
index a5002a8fcc..d010011033 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3-internal.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3-internal.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
   struct clone_args clone_args =
diff --git a/sysdeps/unix/sysv/linux/tst-clone3.c b/sysdeps/unix/sysv/linux/tst-clone3.c
index 6390fe26e8..392fd19795 100644
--- a/sysdeps/unix/sysv/linux/tst-clone3.c
+++ b/sysdeps/unix/sysv/linux/tst-clone3.c
@@ -45,16 +45,14 @@ f (void *a)
    implementation.  */
 #define wait_tid(ctid_ptr, ctid_val)					\
   do {									\
-    __typeof (*(ctid_ptr)) __tid;					\
     /* We need acquire MO here so that we synchronize with the		\
        kernel's store to 0 when the clone terminates.  */		\
-    while ((__tid = atomic_load_explicit (ctid_ptr,			\
-					  memory_order_acquire)) != 0)	\
+    while (atomic_load_explicit (ctid_ptr, memory_order_acquire) != 0)	\
       futex_wait (ctid_ptr, ctid_val);					\
   } while (0)
 
 static inline int
-futex_wait (int *futexp, int val)
+futex_wait (_Atomic pid_t *futexp, int val)
 {
 #ifdef __NR_futex
   return syscall (__NR_futex, futexp, FUTEX_WAIT, val);
@@ -75,7 +73,7 @@ do_test (void)
   /* Initialize with a known value.  ctid is set to zero by the kernel after the
      cloned thread has exited.  */
 #define CTID_INIT_VAL 1
-  pid_t ctid = CTID_INIT_VAL;
+  _Atomic pid_t ctid = CTID_INIT_VAL;
   pid_t tid;
 
 #ifdef __ia64__


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2024-04-17 20:10 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-28 17:44 [glibc/azanella/clang] linux: Adequate tst-clone3 to c11 atomics Adhemerval Zanella
  -- strict thread matches above, loose matches on Subject: below --
2024-04-17 20:10 Adhemerval Zanella
2024-04-02 15:56 Adhemerval Zanella
2024-02-09 17:35 Adhemerval Zanella
2024-02-07 14:10 Adhemerval Zanella
2024-01-29 18:00 Adhemerval Zanella
2023-12-21 18:57 Adhemerval Zanella
2023-09-28 17:55 Adhemerval Zanella
2023-08-30 12:39 Adhemerval Zanella
2023-02-09 19:51 Adhemerval Zanella
2022-10-04 13:02 Adhemerval Zanella
2022-06-09 21:23 Adhemerval Zanella
2022-06-09 13:20 Adhemerval Zanella
2022-06-03 14:09 Adhemerval Zanella
2022-05-13 14:23 Adhemerval Zanella
2022-05-12 19:37 Adhemerval Zanella
2022-05-10 18:27 Adhemerval Zanella
2022-04-29 14:07 Adhemerval Zanella
2022-04-04 12:58 Adhemerval Zanella
2022-03-31 19:10 Adhemerval Zanella
2022-03-29 20:34 Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).