public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/5] c2y proposal add monotonicwait support for mtx and ctx
@ 2023-06-19 22:20 Yonggang Luo
  2023-06-19 22:20 ` [PATCH 1/5] features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23 Yonggang Luo
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Yonggang Luo @ 2023-06-19 22:20 UTC (permalink / raw)
  To: Jens Gustedt, libc-alpha; +Cc: Yonggang Luo

Currently the c11 threads mtx and cnd only support for mtx_timedlock
and cnd_timedwait that use TIME_UTC, and it's not monotonic, for application
want monotonic wait/lock, then they can not use c11 threads,
So here I proposaled functions:
int mtx_timedlock_monotonic( mtx_t *restrict mutex,
                             const struct timespec *restrict time_point );
int cnd_timedwait_monotonic( cnd_t* restrict cond, mtx_t* restrict mutex,
                             const struct timespec* restrict time_point );

to support monotonic lock/wait for mtx/cnd .

Yonggang Luo (5):
  features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23
  time: Implement c23 timespec_get base
  clang-format: should format with 2 space and do not usage tab
  c11: Switch to use pthread_mutex_clocklock and pthread_cond_clockwait
    to implement cnd and mtx lock and wait
  c2y: Add function cnd_timedwait_monotonic and mtx_timedlock_monotonic

 .clang-format                                 |   4 +-
 conform/data/threads.h-data                   |   2 +
 include/features.h                            |   4 +-
 nptl/Versions                                 |   5 +
 sysdeps/pthread/Makefile                      |   2 +
 sysdeps/pthread/cnd_timedwait.c               |   8 +-
 ..._timedwait.c => cnd_timedwait_monotonic.c} |  58 +++++-----
 sysdeps/pthread/mtx_timedlock.c               |   6 +-
 ..._timedlock.c => mtx_timedlock_monotonic.c} |  56 +++++-----
 sysdeps/pthread/threads.h                     |  16 +++
 sysdeps/unix/sysv/linux/Versions              |   6 ++
 sysdeps/unix/sysv/linux/cnd_timedwait.c       |   4 +-
 ..._timedwait.c => cnd_timedwait_monotonic.c} |  18 ++--
 sysdeps/unix/sysv/linux/mtx_timedlock.c       |   4 +-
 ..._timedlock.c => mtx_timedlock_monotonic.c} | 100 +++++++++---------
 sysdeps/unix/sysv/linux/thrd_priv.h           |   8 ++
 time/time.h                                   |  13 +++
 time/timespec_get.c                           |  48 ++++++++-
 18 files changed, 228 insertions(+), 134 deletions(-)
 copy sysdeps/pthread/{cnd_timedwait.c => cnd_timedwait_monotonic.c} (70%)
 copy sysdeps/pthread/{mtx_timedlock.c => mtx_timedlock_monotonic.c} (75%)
 copy sysdeps/unix/sysv/linux/{cnd_timedwait.c => cnd_timedwait_monotonic.c} (68%)
 copy sysdeps/unix/sysv/linux/{mtx_timedlock.c => mtx_timedlock_monotonic.c} (59%)

-- 
2.39.0.windows.1


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

* [PATCH 1/5] features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23
  2023-06-19 22:20 [PATCH 0/5] c2y proposal add monotonicwait support for mtx and ctx Yonggang Luo
@ 2023-06-19 22:20 ` Yonggang Luo
  2023-06-20 20:21   ` Joseph Myers
  2023-06-19 22:20 ` [PATCH 2/5] time: Implement c23 timespec_get base Yonggang Luo
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 13+ messages in thread
From: Yonggang Luo @ 2023-06-19 22:20 UTC (permalink / raw)
  To: Jens Gustedt, libc-alpha; +Cc: Yonggang Luo

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 include/features.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/features.h b/include/features.h
index 9eae86a2d8..084cd4830c 100644
--- a/include/features.h
+++ b/include/features.h
@@ -241,9 +241,9 @@
 /* This is to enable the ISO C2X extension.  */
 #if (defined _ISOC2X_SOURCE \
      || (defined __STDC_VERSION__ && __STDC_VERSION__ > 201710L))
-# define __GLIBC_USE_ISOC2X	1
+# define __GLIBC_USE_ISOC23	1
 #else
-# define __GLIBC_USE_ISOC2X	0
+# define __GLIBC_USE_ISOC23	0
 #endif
 
 /* This is to enable the ISO C11 extension.  */
-- 
2.39.0.windows.1


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

* [PATCH 2/5] time: Implement c23 timespec_get base
  2023-06-19 22:20 [PATCH 0/5] c2y proposal add monotonicwait support for mtx and ctx Yonggang Luo
  2023-06-19 22:20 ` [PATCH 1/5] features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23 Yonggang Luo
@ 2023-06-19 22:20 ` Yonggang Luo
  2023-06-20 12:44   ` Florian Weimer
  2023-06-20 20:25   ` Joseph Myers
  2023-06-19 22:20 ` [PATCH 3/5] clang-format: should format with 2 space and do not usage tab Yonggang Luo
                   ` (2 subsequent siblings)
  4 siblings, 2 replies; 13+ messages in thread
From: Yonggang Luo @ 2023-06-19 22:20 UTC (permalink / raw)
  To: Jens Gustedt, libc-alpha; +Cc: Yonggang Luo

These newly implement base are:
#define TIME_MONOTONIC          2
#define TIME_PROCESS_CPUTIME_ID 3
#define TIME_THREAD_CPUTIME_ID  4
#define TIME_MONOTONIC_RAW      5
#define TIME_REALTIME_COARSE    6
#define TIME_MONOTONIC_COARSE   7
#define TIME_BOOTTIME           8
#define TIME_REALTIME_ALARM     9
#define TIME_BOOTTIME_ALARM     10
#define TIME_SGI_CYCLE          11
#define TIME_TAI                12

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 time/time.h         | 13 ++++++++++++
 time/timespec_get.c | 48 ++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 58 insertions(+), 3 deletions(-)

diff --git a/time/time.h b/time/time.h
index 368f4dc588..189a560199 100644
--- a/time/time.h
+++ b/time/time.h
@@ -64,6 +64,19 @@ typedef __pid_t pid_t;
 /* Time base values for timespec_get.  */
 # define TIME_UTC 1
 #endif
+#ifdef __GLIBC_USE_ISOC23
+#define TIME_MONOTONIC          2
+#define TIME_PROCESS_CPUTIME_ID 3
+#define TIME_THREAD_CPUTIME_ID  4
+#define TIME_MONOTONIC_RAW      5
+#define TIME_REALTIME_COARSE    6
+#define TIME_MONOTONIC_COARSE   7
+#define TIME_BOOTTIME           8
+#define TIME_REALTIME_ALARM     9
+#define TIME_BOOTTIME_ALARM     10
+#define TIME_SGI_CYCLE          11
+#define TIME_TAI                12
+#endif
 
 __BEGIN_DECLS
 
diff --git a/time/timespec_get.c b/time/timespec_get.c
index 9b1d4f22ed..a57b1ee0b8 100644
--- a/time/timespec_get.c
+++ b/time/timespec_get.c
@@ -22,10 +22,52 @@
 int
 timespec_get (struct timespec *ts, int base)
 {
-  if (base == TIME_UTC)
+	clockid_t clockid = -1;
+	switch (base) {
+	default:
+		break;
+	case TIME_UTC:
+		clockid = CLOCK_REALTIME;
+		break;
+	case TIME_MONOTONIC:
+		clockid = CLOCK_MONOTONIC;
+		break;
+	case TIME_PROCESS_CPUTIME_ID:
+		clockid = CLOCK_PROCESS_CPUTIME_ID;
+		break;
+	case TIME_THREAD_CPUTIME_ID:
+		clockid = CLOCK_THREAD_CPUTIME_ID;
+		break;
+	case TIME_MONOTONIC_RAW:
+		clockid = CLOCK_MONOTONIC_RAW;
+		break;
+	case TIME_REALTIME_COARSE:
+		clockid = CLOCK_REALTIME_COARSE;
+		break;
+	case TIME_MONOTONIC_COARSE:
+		clockid = CLOCK_MONOTONIC_COARSE;
+		break;
+	case TIME_BOOTTIME:
+		clockid = CLOCK_BOOTTIME;
+		break;
+	case TIME_REALTIME_ALARM:
+		clockid = CLOCK_REALTIME_ALARM;
+		break;
+	case TIME_BOOTTIME_ALARM:
+		clockid = CLOCK_BOOTTIME_ALARM;
+		break;
+	case TIME_SGI_CYCLE:
+		clockid = CLOCK_SGI_CYCLE;
+		break;
+	case TIME_TAI:
+		clockid = CLOCK_TAI;
+		break;
+	}
+  if (clockid >= 0)
     {
-      __clock_gettime (CLOCK_REALTIME, ts);
-      return base;
+      if (__clock_gettime (clockid, ts) >= 0) {
+        return base;
+      }
     }
   return 0;
 }
-- 
2.39.0.windows.1


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

* [PATCH 3/5] clang-format: should format with 2 space and do not usage tab
  2023-06-19 22:20 [PATCH 0/5] c2y proposal add monotonicwait support for mtx and ctx Yonggang Luo
  2023-06-19 22:20 ` [PATCH 1/5] features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23 Yonggang Luo
  2023-06-19 22:20 ` [PATCH 2/5] time: Implement c23 timespec_get base Yonggang Luo
@ 2023-06-19 22:20 ` Yonggang Luo
  2023-06-19 22:20 ` [PATCH 4/5] c11: Switch to use pthread_mutex_clocklock and pthread_cond_clockwait to implement cnd and mtx lock and wait Yonggang Luo
  2023-06-19 22:20 ` [PATCH 5/5] c2y: Add function cnd_timedwait_monotonic and mtx_timedlock_monotonic Yonggang Luo
  4 siblings, 0 replies; 13+ messages in thread
From: Yonggang Luo @ 2023-06-19 22:20 UTC (permalink / raw)
  To: Jens Gustedt, libc-alpha; +Cc: Yonggang Luo

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 .clang-format | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.clang-format b/.clang-format
index 36c169e007..6e8ef236be 100644
--- a/.clang-format
+++ b/.clang-format
@@ -146,8 +146,8 @@ SpacesInParentheses: false
 SpacesInSquareBrackets: false
 SpaceBeforeSquareBrackets: false
 Standard:        Cpp03
-TabWidth:        8
-UseTab:          Always
+TabWidth:        2
+UseTab:          Never
 ForEachMacros:
   - 'FOR_EACH_IMPL'
   - 'list_for_each'
-- 
2.39.0.windows.1


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

* [PATCH 4/5] c11: Switch to use pthread_mutex_clocklock and pthread_cond_clockwait to implement cnd and mtx lock and wait
  2023-06-19 22:20 [PATCH 0/5] c2y proposal add monotonicwait support for mtx and ctx Yonggang Luo
                   ` (2 preceding siblings ...)
  2023-06-19 22:20 ` [PATCH 3/5] clang-format: should format with 2 space and do not usage tab Yonggang Luo
@ 2023-06-19 22:20 ` Yonggang Luo
  2023-06-20  9:15   ` Florian Weimer
  2023-06-19 22:20 ` [PATCH 5/5] c2y: Add function cnd_timedwait_monotonic and mtx_timedlock_monotonic Yonggang Luo
  4 siblings, 1 reply; 13+ messages in thread
From: Yonggang Luo @ 2023-06-19 22:20 UTC (permalink / raw)
  To: Jens Gustedt, libc-alpha; +Cc: Yonggang Luo

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 sysdeps/pthread/cnd_timedwait.c         | 8 ++++----
 sysdeps/pthread/mtx_timedlock.c         | 6 +++---
 sysdeps/unix/sysv/linux/cnd_timedwait.c | 4 ++--
 sysdeps/unix/sysv/linux/mtx_timedlock.c | 4 ++--
 4 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/sysdeps/pthread/cnd_timedwait.c b/sysdeps/pthread/cnd_timedwait.c
index 25df50cb3a..3785fd21ba 100644
--- a/sysdeps/pthread/cnd_timedwait.c
+++ b/sysdeps/pthread/cnd_timedwait.c
@@ -20,10 +20,10 @@
 
 int
 cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex,
-	       const struct timespec* restrict time_point)
+               const struct timespec *restrict time_point)
 {
-  int err_code = __pthread_cond_timedwait ((pthread_cond_t *) cond,
-					   (pthread_mutex_t *) mutex,
-					   time_point);
+  int err_code = pthread_cond_clockwait ((pthread_cond_t *) cond,
+                                         (pthread_mutex_t *) mutex,
+                                         CLOCK_REALTIME, time_point);
   return thrd_err_map (err_code);
 }
diff --git a/sysdeps/pthread/mtx_timedlock.c b/sysdeps/pthread/mtx_timedlock.c
index a3d236f3e1..763f07d2f8 100644
--- a/sysdeps/pthread/mtx_timedlock.c
+++ b/sysdeps/pthread/mtx_timedlock.c
@@ -20,9 +20,9 @@
 
 int
 mtx_timedlock (mtx_t *restrict mutex,
-	       const struct timespec *restrict time_point)
+               const struct timespec *restrict time_point)
 {
-  int err_code = __pthread_mutex_timedlock ((pthread_mutex_t *)mutex,
-					    time_point);
+  int err_code = pthread_mutex_clocklock ((pthread_mutex_t *) mutex,
+                                          CLOCK_REALTIME, time_point);
   return thrd_err_map (err_code);
 }
diff --git a/sysdeps/unix/sysv/linux/cnd_timedwait.c b/sysdeps/unix/sysv/linux/cnd_timedwait.c
index 9fa6d71d1a..c612d4f94d 100644
--- a/sysdeps/unix/sysv/linux/cnd_timedwait.c
+++ b/sysdeps/unix/sysv/linux/cnd_timedwait.c
@@ -24,9 +24,9 @@ int
 __cnd_timedwait64 (cnd_t *restrict cond, mtx_t *restrict mutex,
                    const struct __timespec64 *restrict time_point)
 {
-  int err_code = __pthread_cond_timedwait64 ((pthread_cond_t *) cond,
+  int err_code = __pthread_cond_clockwait64 ((pthread_cond_t *) cond,
                                              (pthread_mutex_t *) mutex,
-                                             time_point);
+                                             CLOCK_REALTIME, time_point);
   return thrd_err_map (err_code);
 }
 
diff --git a/sysdeps/unix/sysv/linux/mtx_timedlock.c b/sysdeps/unix/sysv/linux/mtx_timedlock.c
index 8019792868..b8f6d51940 100644
--- a/sysdeps/unix/sysv/linux/mtx_timedlock.c
+++ b/sysdeps/unix/sysv/linux/mtx_timedlock.c
@@ -24,8 +24,8 @@ int
 __mtx_timedlock64 (mtx_t *restrict mutex,
                    const struct __timespec64 *restrict time_point)
 {
-  int err_code = __pthread_mutex_timedlock64 ((pthread_mutex_t *)mutex,
-                                              time_point);
+  int err_code = __pthread_mutex_clocklock64 ((pthread_mutex_t *) mutex,
+                                              CLOCK_REALTIME, time_point);
   return thrd_err_map (err_code);
 }
 
-- 
2.39.0.windows.1


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

* [PATCH 5/5] c2y: Add function cnd_timedwait_monotonic and mtx_timedlock_monotonic
  2023-06-19 22:20 [PATCH 0/5] c2y proposal add monotonicwait support for mtx and ctx Yonggang Luo
                   ` (3 preceding siblings ...)
  2023-06-19 22:20 ` [PATCH 4/5] c11: Switch to use pthread_mutex_clocklock and pthread_cond_clockwait to implement cnd and mtx lock and wait Yonggang Luo
@ 2023-06-19 22:20 ` Yonggang Luo
  2023-06-20 20:29   ` Joseph Myers
  4 siblings, 1 reply; 13+ messages in thread
From: Yonggang Luo @ 2023-06-19 22:20 UTC (permalink / raw)
  To: Jens Gustedt, libc-alpha; +Cc: Yonggang Luo

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
---
 conform/data/threads.h-data                   |  2 +
 nptl/Versions                                 |  5 ++
 sysdeps/pthread/Makefile                      |  2 +
 sysdeps/pthread/cnd_timedwait_monotonic.c     | 29 +++++++++++
 sysdeps/pthread/mtx_timedlock_monotonic.c     | 28 ++++++++++
 sysdeps/pthread/threads.h                     | 16 ++++++
 sysdeps/unix/sysv/linux/Versions              |  6 +++
 .../unix/sysv/linux/cnd_timedwait_monotonic.c | 51 +++++++++++++++++++
 .../unix/sysv/linux/mtx_timedlock_monotonic.c | 50 ++++++++++++++++++
 sysdeps/unix/sysv/linux/thrd_priv.h           |  8 +++
 10 files changed, 197 insertions(+)
 create mode 100644 sysdeps/pthread/cnd_timedwait_monotonic.c
 create mode 100644 sysdeps/pthread/mtx_timedlock_monotonic.c
 create mode 100644 sysdeps/unix/sysv/linux/cnd_timedwait_monotonic.c
 create mode 100644 sysdeps/unix/sysv/linux/mtx_timedlock_monotonic.c

diff --git a/conform/data/threads.h-data b/conform/data/threads.h-data
index 406e497726..cb71ddfaf7 100644
--- a/conform/data/threads.h-data
+++ b/conform/data/threads.h-data
@@ -34,6 +34,7 @@ function void thrd_yield (void)
 function int mtx_init (mtx_t*, int)
 function int mtx_lock (mtx_t*)
 function int mtx_timedlock (mtx_t*, const struct timespec*)
+function int mtx_timedlock_monotonic (mtx_t*, const struct timespec*)
 function int mtx_trylock (mtx_t*)
 function int mtx_unlock (mtx_t*)
 function void mtx_destroy (mtx_t*)
@@ -45,6 +46,7 @@ function int cnd_signal (cnd_t*)
 function int cnd_broadcast (cnd_t*)
 function int cnd_wait (cnd_t*, mtx_t*)
 function int cnd_timedwait (cnd_t*, mtx_t*, const struct timespec*)
+function int cnd_timedwait_monotonic (cnd_t*, mtx_t*, const struct timespec*)
 function void cnd_destroy (cnd_t*)
 
 function int tss_create (tss_t*, tss_dtor_t)
diff --git a/nptl/Versions b/nptl/Versions
index 3221de89d1..429b05fc71 100644
--- a/nptl/Versions
+++ b/nptl/Versions
@@ -525,6 +525,11 @@ libpthread {
   GLIBC_2.31 {
     __libpthread_version_placeholder;
   }
+
+  GLIBC_2.38 {
+    cnd_timedwait_monotonic;
+    mtx_timedlock_monotonic;
+  }
 }
 
 ld {
diff --git a/sysdeps/pthread/Makefile b/sysdeps/pthread/Makefile
index 32cf4eb119..293e321132 100644
--- a/sysdeps/pthread/Makefile
+++ b/sysdeps/pthread/Makefile
@@ -40,11 +40,13 @@ $(libpthread-routines-var) += \
   cnd_init \
   cnd_signal \
   cnd_timedwait \
+  cnd_timedwait_monotonic \
   cnd_wait \
   mtx_destroy \
   mtx_init \
   mtx_lock \
   mtx_timedlock \
+  mtx_timedlock_monotonic \
   mtx_trylock \
   mtx_unlock \
   pthread_atfork_compat \
diff --git a/sysdeps/pthread/cnd_timedwait_monotonic.c b/sysdeps/pthread/cnd_timedwait_monotonic.c
new file mode 100644
index 0000000000..8e9a32791a
--- /dev/null
+++ b/sysdeps/pthread/cnd_timedwait_monotonic.c
@@ -0,0 +1,29 @@
+/* C11 threads conditional timed wait implementation.
+   Copyright (C) 2018-2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+int
+cnd_timedwait_monotonic (cnd_t *restrict cond, mtx_t *restrict mutex,
+                         const struct timespec *restrict time_point)
+{
+  int err_code = __pthread_cond_clockwait ((pthread_cond_t *) cond,
+                                           (pthread_mutex_t *) mutex,
+                                           CLOCK_MONOTONIC, time_point);
+  return thrd_err_map (err_code);
+}
diff --git a/sysdeps/pthread/mtx_timedlock_monotonic.c b/sysdeps/pthread/mtx_timedlock_monotonic.c
new file mode 100644
index 0000000000..96d1dde7f7
--- /dev/null
+++ b/sysdeps/pthread/mtx_timedlock_monotonic.c
@@ -0,0 +1,28 @@
+/* C11 threads mutex timed lock implementation.
+   Copyright (C) 2018-2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include "thrd_priv.h"
+
+int
+mtx_timedlock_monotonic (mtx_t *restrict mutex,
+                         const struct timespec *restrict time_point)
+{
+  int err_code = pthread_mutex_clocklock ((pthread_mutex_t *) mutex,
+                                          CLOCK_MONOTONIC, time_point);
+  return thrd_err_map (err_code);
+}
diff --git a/sysdeps/pthread/threads.h b/sysdeps/pthread/threads.h
index d88d7a3ddd..b3ddaafd05 100644
--- a/sysdeps/pthread/threads.h
+++ b/sysdeps/pthread/threads.h
@@ -146,14 +146,21 @@ extern int mtx_lock (mtx_t *__mutex);
 #ifndef __USE_TIME_BITS64
 extern int mtx_timedlock (mtx_t *__restrict __mutex,
 			  const struct timespec *__restrict __time_point);
+extern int mtx_timedlock_monotonic (mtx_t *__restrict __mutex,
+                                    const struct timespec *__restrict __time_point);
 #else
 # ifdef __REDIRECT
 extern int __REDIRECT (mtx_timedlock, (mtx_t *__restrict __mutex,
                                        const struct timespec *__restrict
                                        __time_point),
                        __mtx_timedlock64);
+extern int __REDIRECT (mtx_timedlock_monotonic, (mtx_t *__restrict __mutex,
+                                                 const struct timespec *__restrict
+                                                 __time_point),
+                       __mtx_timedlock_monotonic64);
 # else
 #  define mtx_timedlock __mtx_timedlock64
+#  define mtx_timedlock_monotonic __mtx_timedlock_monotonic64
 # endif
 #endif
 
@@ -198,6 +205,9 @@ extern int cnd_wait (cnd_t *__cond, mtx_t *__mutex);
 extern int cnd_timedwait (cnd_t *__restrict __cond,
 			  mtx_t *__restrict __mutex,
 			  const struct timespec *__restrict __time_point);
+extern int cnd_timedwait_monotonic (cnd_t *__restrict __cond,
+                                    mtx_t *__restrict __mutex,
+                                    const struct timespec *__restrict __time_point);
 #else
 # ifdef __REDIRECT
 extern int __REDIRECT (cnd_timedwait, (cnd_t *__restrict __cond,
@@ -205,8 +215,14 @@ extern int __REDIRECT (cnd_timedwait, (cnd_t *__restrict __cond,
                                        const struct timespec *__restrict
                                        __time_point),
                        __cnd_timedwait64);
+extern int __REDIRECT (cnd_timedwait_monotonic, (cnd_t *__restrict __cond,
+                                                 mtx_t *__restrict __mutex,
+                                                 const struct timespec *__restrict
+                                                 __time_point),
+                       __cnd_timedwait_monotonic64);
 # else
 #  define cnd_timedwait __cnd_timedwait64
+#  define cnd_timedwait_monotonic __cnd_timedwait_monotonic64
 # endif
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index bc59bce42f..5b68cfdabe 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -319,6 +319,12 @@ libc {
   GLIBC_2.37 {
 %ifdef TIME64_NON_DEFAULT
     __ppoll64_chk;
+%endif
+  }
+  GLIBC_2.38 {
+%ifdef TIME64_NON_DEFAULT
+    __cnd_timedwait_monotonic64;
+    __mtx_timedlock_monotonic64;
 %endif
   }
   GLIBC_PRIVATE {
diff --git a/sysdeps/unix/sysv/linux/cnd_timedwait_monotonic.c b/sysdeps/unix/sysv/linux/cnd_timedwait_monotonic.c
new file mode 100644
index 0000000000..351fe944f4
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/cnd_timedwait_monotonic.c
@@ -0,0 +1,51 @@
+/* C11 threads conditional timed wait implementation - Linux variant.
+   Copyright (C) 2020-2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <time.h>
+#include <shlib-compat.h>
+#include "thrd_priv.h"
+
+int
+__cnd_timedwait_monotonic64 (cnd_t *restrict cond, mtx_t *restrict mutex,
+                   const struct __timespec64 *restrict time_point)
+{
+  int err_code = __pthread_cond_clockwait64 ((pthread_cond_t *) cond,
+                                             (pthread_mutex_t *) mutex,
+                                             CLOCK_MONOTONIC, time_point);
+  return thrd_err_map (err_code);
+}
+
+#if __TIMESIZE == 64
+strong_alias (__cnd_timedwait_monotonic64, ___cnd_timedwait_monotonic)
+#else
+libc_hidden_def (__cnd_timedwait_monotonic64)
+
+int
+___cnd_timedwait_monotonic (cnd_t *restrict cond, mtx_t *restrict mutex,
+                  const struct timespec *restrict time_point)
+{
+  struct __timespec64 ts64 = valid_timespec_to_timespec64 (*time_point);
+
+  return __cnd_timedwait_monotonic64(cond, mutex, &ts64);
+}
+#endif /* __TIMESIZE == 64 */
+versioned_symbol (libc, ___cnd_timedwait_monotonic, cnd_timedwait_monotonic, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
+compat_symbol (libpthread, ___cnd_timedwait_monotonic, cnd_timedwait_monotonic, GLIBC_2_28);
+#endif
diff --git a/sysdeps/unix/sysv/linux/mtx_timedlock_monotonic.c b/sysdeps/unix/sysv/linux/mtx_timedlock_monotonic.c
new file mode 100644
index 0000000000..435232c87d
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mtx_timedlock_monotonic.c
@@ -0,0 +1,50 @@
+/* C11 threads mutex timed lock implementation - Linux variant.
+   Copyright (C) 2020-2023 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#include <time.h>
+#include <shlib-compat.h>
+#include "thrd_priv.h"
+
+int
+__mtx_timedlock_monotonic64 (mtx_t *restrict mutex,
+                             const struct __timespec64 *restrict time_point)
+{
+  int err_code = __pthread_mutex_clocklock64 ((pthread_mutex_t *) mutex,
+                                              CLOCK_MONOTONIC, time_point);
+  return thrd_err_map (err_code);
+}
+
+#if __TIMESIZE == 64
+strong_alias (__mtx_timedlock_monotonic64, ___mtx_timedlock_monotonic)
+#else
+libc_hidden_def (__mtx_timedlock_monotonic64)
+
+int
+___mtx_timedlock_monotonic (mtx_t *restrict mutex,
+                            const struct timespec *restrict time_point)
+{
+  struct __timespec64 ts64 = valid_timespec_to_timespec64 (*time_point);
+
+  return __mtx_timedlock_monotonic64 (mutex, &ts64);
+}
+#endif /* __TIMESIZE == 64 */
+versioned_symbol (libc, ___mtx_timedlock_monotonic, mtx_timedlock_monotonic, GLIBC_2_34);
+
+#if OTHER_SHLIB_COMPAT (libpthread, GLIBC_2_28, GLIBC_2_34)
+compat_symbol (libpthread, ___mtx_timedlock_monotonic, mtx_timedlock_monotonic, GLIBC_2_28);
+#endif
diff --git a/sysdeps/unix/sysv/linux/thrd_priv.h b/sysdeps/unix/sysv/linux/thrd_priv.h
index af23a10a07..905798ecf2 100644
--- a/sysdeps/unix/sysv/linux/thrd_priv.h
+++ b/sysdeps/unix/sysv/linux/thrd_priv.h
@@ -20,15 +20,23 @@
 
 #if __TIMESIZE == 64
 # define __cnd_timedwait64 __cnd_timedwait
+# define __cnd_timedwait_monotonic64 __cnd_timedwait_monotonic
 # define __mtx_timedlock64 __mtx_timedlock
+# define __mtx_timedlock_monotonic64 __mtx_timedlock_monotonic
 # define __thrd_sleep64 __thrd_sleep
 #else
 extern int __cnd_timedwait64 (cnd_t *restrict cond, mtx_t *restrict mutex,
                               const struct __timespec64 *restrict time_point);
 libc_hidden_proto (__cnd_timedwait64)
+extern int __cnd_timedwait_monotonic64 (cnd_t *restrict cond, mtx_t *restrict mutex,
+                                        const struct __timespec64 *restrict time_point);
+libc_hidden_proto (__cnd_timedwait_monotonic64)
 extern int __mtx_timedlock64 (mtx_t *restrict mutex,
                               const struct __timespec64 *restrict time_point);
 libc_hidden_proto (__mtx_timedlock64)
+extern int __mtx_timedlock_monotonic64 (mtx_t *restrict mutex,
+                                        const struct __timespec64 *restrict time_point);
+libc_hidden_proto (__mtx_timedlock_monotonic64)
 extern int __thrd_sleep64 (const struct __timespec64 *time_point,
                            struct __timespec64 *remaining);
 libc_hidden_proto (__thrd_sleep64)
-- 
2.39.0.windows.1


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

* Re: [PATCH 4/5] c11: Switch to use pthread_mutex_clocklock and pthread_cond_clockwait to implement cnd and mtx lock and wait
  2023-06-19 22:20 ` [PATCH 4/5] c11: Switch to use pthread_mutex_clocklock and pthread_cond_clockwait to implement cnd and mtx lock and wait Yonggang Luo
@ 2023-06-20  9:15   ` Florian Weimer
  0 siblings, 0 replies; 13+ messages in thread
From: Florian Weimer @ 2023-06-20  9:15 UTC (permalink / raw)
  To: Yonggang Luo via Libc-alpha; +Cc: Jens Gustedt, Yonggang Luo

* Yonggang Luo via Libc-alpha:

> Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
> ---
>  sysdeps/pthread/cnd_timedwait.c         | 8 ++++----
>  sysdeps/pthread/mtx_timedlock.c         | 6 +++---
>  sysdeps/unix/sysv/linux/cnd_timedwait.c | 4 ++--
>  sysdeps/unix/sysv/linux/mtx_timedlock.c | 4 ++--
>  4 files changed, 11 insertions(+), 11 deletions(-)
>
> diff --git a/sysdeps/pthread/cnd_timedwait.c b/sysdeps/pthread/cnd_timedwait.c
> index 25df50cb3a..3785fd21ba 100644
> --- a/sysdeps/pthread/cnd_timedwait.c
> +++ b/sysdeps/pthread/cnd_timedwait.c
> @@ -20,10 +20,10 @@
>  
>  int
>  cnd_timedwait (cnd_t *restrict cond, mtx_t *restrict mutex,
> -	       const struct timespec* restrict time_point)
> +               const struct timespec *restrict time_point)
>  {
> -  int err_code = __pthread_cond_timedwait ((pthread_cond_t *) cond,
> -					   (pthread_mutex_t *) mutex,
> -					   time_point);
> +  int err_code = pthread_cond_clockwait ((pthread_cond_t *) cond,
> +                                         (pthread_mutex_t *) mutex,
> +                                         CLOCK_REALTIME, time_point);
>    return thrd_err_map (err_code);
>  }

Doesn't this cause linknamespace failures during “make check”?

Thanks,
Florian


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

* Re: [PATCH 2/5] time: Implement c23 timespec_get base
  2023-06-19 22:20 ` [PATCH 2/5] time: Implement c23 timespec_get base Yonggang Luo
@ 2023-06-20 12:44   ` Florian Weimer
  2023-06-20 16:10     ` 罗勇刚(Yonggang Luo)
  2023-06-20 20:25   ` Joseph Myers
  1 sibling, 1 reply; 13+ messages in thread
From: Florian Weimer @ 2023-06-20 12:44 UTC (permalink / raw)
  To: Yonggang Luo via Libc-alpha; +Cc: Jens Gustedt, Yonggang Luo

* Yonggang Luo via Libc-alpha:

> diff --git a/time/timespec_get.c b/time/timespec_get.c
> index 9b1d4f22ed..a57b1ee0b8 100644
> --- a/time/timespec_get.c
> +++ b/time/timespec_get.c
> @@ -22,10 +22,52 @@
>  int
>  timespec_get (struct timespec *ts, int base)
>  {
> -  if (base == TIME_UTC)
> +	clockid_t clockid = -1;
> +	switch (base) {
> +	default:
> +		break;
> +	case TIME_UTC:
> +		clockid = CLOCK_REALTIME;
> +		break;
> +	case TIME_MONOTONIC:
> +		clockid = CLOCK_MONOTONIC;
> +		break;
> +	case TIME_PROCESS_CPUTIME_ID:
> +		clockid = CLOCK_PROCESS_CPUTIME_ID;
> +		break;
> +	case TIME_THREAD_CPUTIME_ID:
> +		clockid = CLOCK_THREAD_CPUTIME_ID;
> +		break;
> +	case TIME_MONOTONIC_RAW:
> +		clockid = CLOCK_MONOTONIC_RAW;
> +		break;
> +	case TIME_REALTIME_COARSE:
> +		clockid = CLOCK_REALTIME_COARSE;
> +		break;
> +	case TIME_MONOTONIC_COARSE:
> +		clockid = CLOCK_MONOTONIC_COARSE;
> +		break;
> +	case TIME_BOOTTIME:
> +		clockid = CLOCK_BOOTTIME;
> +		break;
> +	case TIME_REALTIME_ALARM:
> +		clockid = CLOCK_REALTIME_ALARM;
> +		break;
> +	case TIME_BOOTTIME_ALARM:
> +		clockid = CLOCK_BOOTTIME_ALARM;
> +		break;
> +	case TIME_SGI_CYCLE:
> +		clockid = CLOCK_SGI_CYCLE;
> +		break;
> +	case TIME_TAI:
> +		clockid = CLOCK_TAI;
> +		break;
> +	}
> +  if (clockid >= 0)
>      {
> -      __clock_gettime (CLOCK_REALTIME, ts);
> -      return base;
> +      if (__clock_gettime (clockid, ts) >= 0) {
> +        return base;
> +      }
>      }
>    return 0;
>  }

This was recently discussed on the libc-coord list:

  Relation between C timespec_get time bases and POSIX clockid_t values.
  <https://www.openwall.com/lists/libc-coord/2023/04/25/1>

I'm not sure if we should extend this because it's just a bizarre WG14
not-invent-here interface, designed to be incompatible with existing
implementation practice.

Thanks,
Florian


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

* Re: [PATCH 2/5] time: Implement c23 timespec_get base
  2023-06-20 12:44   ` Florian Weimer
@ 2023-06-20 16:10     ` 罗勇刚(Yonggang Luo)
  0 siblings, 0 replies; 13+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2023-06-20 16:10 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Yonggang Luo via Libc-alpha, Jens Gustedt

[-- Attachment #1: Type: text/plain, Size: 2942 bytes --]

On Tue, Jun 20, 2023 at 8:44 PM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Yonggang Luo via Libc-alpha:
>
> > diff --git a/time/timespec_get.c b/time/timespec_get.c
> > index 9b1d4f22ed..a57b1ee0b8 100644
> > --- a/time/timespec_get.c
> > +++ b/time/timespec_get.c
> > @@ -22,10 +22,52 @@
> >  int
> >  timespec_get (struct timespec *ts, int base)
> >  {
> > -  if (base == TIME_UTC)
> > +     clockid_t clockid = -1;
> > +     switch (base) {
> > +     default:
> > +             break;
> > +     case TIME_UTC:
> > +             clockid = CLOCK_REALTIME;
> > +             break;
> > +     case TIME_MONOTONIC:
> > +             clockid = CLOCK_MONOTONIC;
> > +             break;
> > +     case TIME_PROCESS_CPUTIME_ID:
> > +             clockid = CLOCK_PROCESS_CPUTIME_ID;
> > +             break;
> > +     case TIME_THREAD_CPUTIME_ID:
> > +             clockid = CLOCK_THREAD_CPUTIME_ID;
> > +             break;
> > +     case TIME_MONOTONIC_RAW:
> > +             clockid = CLOCK_MONOTONIC_RAW;
> > +             break;
> > +     case TIME_REALTIME_COARSE:
> > +             clockid = CLOCK_REALTIME_COARSE;
> > +             break;
> > +     case TIME_MONOTONIC_COARSE:
> > +             clockid = CLOCK_MONOTONIC_COARSE;
> > +             break;
> > +     case TIME_BOOTTIME:
> > +             clockid = CLOCK_BOOTTIME;
> > +             break;
> > +     case TIME_REALTIME_ALARM:
> > +             clockid = CLOCK_REALTIME_ALARM;
> > +             break;
> > +     case TIME_BOOTTIME_ALARM:
> > +             clockid = CLOCK_BOOTTIME_ALARM;
> > +             break;
> > +     case TIME_SGI_CYCLE:
> > +             clockid = CLOCK_SGI_CYCLE;
> > +             break;
> > +     case TIME_TAI:
> > +             clockid = CLOCK_TAI;
> > +             break;
> > +     }
> > +  if (clockid >= 0)
> >      {
> > -      __clock_gettime (CLOCK_REALTIME, ts);
> > -      return base;
> > +      if (__clock_gettime (clockid, ts) >= 0) {
> > +        return base;
> > +      }
> >      }
> >    return 0;
> >  }
>
> This was recently discussed on the libc-coord list:
>
>   Relation between C timespec_get time bases and POSIX clockid_t values.
>   <https://www.openwall.com/lists/libc-coord/2023/04/25/1>
>
> I'm not sure if we should extend this because it's just a bizarre WG14
> not-invent-here interface, designed to be incompatible with existing
> implementation practice.

These are implemented
https://gustedt.gitlabpages.inria.fr/c23-library/#time_monotonic-time_active-time_thread_active
So time_base = clock_id + 1 for linux/posix.
But do we need guarantee that, because there so much posix implementation.

Maybe we need a function named timebase_to_clockid/clockid_to_timebase in
posix standard, for c standard just keep as is


>
> Thanks,
> Florian
>


--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

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

* Re: [PATCH 1/5] features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23
  2023-06-19 22:20 ` [PATCH 1/5] features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23 Yonggang Luo
@ 2023-06-20 20:21   ` Joseph Myers
  2023-06-21  6:32     ` 罗勇刚(Yonggang Luo)
  0 siblings, 1 reply; 13+ messages in thread
From: Joseph Myers @ 2023-06-20 20:21 UTC (permalink / raw)
  To: Yonggang Luo; +Cc: Jens Gustedt, libc-alpha

Why?  You do realise that the DIS ballot resolution isn't until 2024, and 
it's entirely plausible that we end up with an FDIS if there are any 
technical comments on the DIS ballot?  We haven't actually discussed 
whether to *call* it C24, or whether to increase the __STDC_VERSION__ 
value (and other associated values), yet at the current meeting (if that's 
to be discussed, Other Business would be the natural agenda item), but it 
seems extremely premature to suppose the name will be C23, and rename 
internal interfaces accordingly, when we know WG14 don't be done with it 
until January 2024 at the earliest, or several months later if an FDIS is 
needed.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [PATCH 2/5] time: Implement c23 timespec_get base
  2023-06-19 22:20 ` [PATCH 2/5] time: Implement c23 timespec_get base Yonggang Luo
  2023-06-20 12:44   ` Florian Weimer
@ 2023-06-20 20:25   ` Joseph Myers
  1 sibling, 0 replies; 13+ messages in thread
From: Joseph Myers @ 2023-06-20 20:25 UTC (permalink / raw)
  To: Yonggang Luo; +Cc: Jens Gustedt, libc-alpha

On Tue, 20 Jun 2023, Yonggang Luo via Libc-alpha wrote:

> +#ifdef __GLIBC_USE_ISOC23
> +#define TIME_MONOTONIC          2

The only standard values new in C2x are TIME_MONOTONIC, TIME_ACTIVE and 
TIME_THREAD_ACTIVE.  All others should probably be conditioned on 
__USE_GNU if defined at all.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [PATCH 5/5] c2y: Add function cnd_timedwait_monotonic and mtx_timedlock_monotonic
  2023-06-19 22:20 ` [PATCH 5/5] c2y: Add function cnd_timedwait_monotonic and mtx_timedlock_monotonic Yonggang Luo
@ 2023-06-20 20:29   ` Joseph Myers
  0 siblings, 0 replies; 13+ messages in thread
From: Joseph Myers @ 2023-06-20 20:29 UTC (permalink / raw)
  To: Yonggang Luo; +Cc: Jens Gustedt, libc-alpha

On Tue, 20 Jun 2023, Yonggang Luo via Libc-alpha wrote:

> diff --git a/conform/data/threads.h-data b/conform/data/threads.h-data
> index 406e497726..cb71ddfaf7 100644
> --- a/conform/data/threads.h-data
> +++ b/conform/data/threads.h-data
> @@ -34,6 +34,7 @@ function void thrd_yield (void)
>  function int mtx_init (mtx_t*, int)
>  function int mtx_lock (mtx_t*)
>  function int mtx_timedlock (mtx_t*, const struct timespec*)
> +function int mtx_timedlock_monotonic (mtx_t*, const struct timespec*)
>  function int mtx_trylock (mtx_t*)
>  function int mtx_unlock (mtx_t*)
>  function void mtx_destroy (mtx_t*)
> @@ -45,6 +46,7 @@ function int cnd_signal (cnd_t*)
>  function int cnd_broadcast (cnd_t*)
>  function int cnd_wait (cnd_t*, mtx_t*)
>  function int cnd_timedwait (cnd_t*, mtx_t*, const struct timespec*)
> +function int cnd_timedwait_monotonic (cnd_t*, mtx_t*, const struct timespec*)
>  function void cnd_destroy (cnd_t*)

No, conform/* shows what is in an actual standard, not glibc inventions 
that might be in some future standard, and everything in those data files 
is conditioned based on exactly what supported standards contain it - 
you're changing a section of C11 functions to add things that aren't in 
C11 or any standard at all.  We haven't yet added C2x support to conform/* 
(that should wait for C2x support to be completed in glibc as well as for 
the technical content of C2x to be finalized, changes to the expected 
header contents are still going into C2x), and at that point, C2x 
additions would be conditioned on defined ISO24 or similar, C2y (only once 
that's finalized etc.) on defined ISO27 or similar.

> diff --git a/sysdeps/pthread/threads.h b/sysdeps/pthread/threads.h
> index d88d7a3ddd..b3ddaafd05 100644
> --- a/sysdeps/pthread/threads.h
> +++ b/sysdeps/pthread/threads.h
> @@ -146,14 +146,21 @@ extern int mtx_lock (mtx_t *__mutex);
>  #ifndef __USE_TIME_BITS64
>  extern int mtx_timedlock (mtx_t *__restrict __mutex,
>  			  const struct timespec *__restrict __time_point);
> +extern int mtx_timedlock_monotonic (mtx_t *__restrict __mutex,
> +                                    const struct timespec *__restrict __time_point);

New functions like this should be conditioned on __USE_GNU in the headers 
(even when in a reserved namespace other than __*).

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: [PATCH 1/5] features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23
  2023-06-20 20:21   ` Joseph Myers
@ 2023-06-21  6:32     ` 罗勇刚(Yonggang Luo)
  0 siblings, 0 replies; 13+ messages in thread
From: 罗勇刚(Yonggang Luo) @ 2023-06-21  6:32 UTC (permalink / raw)
  To: Joseph Myers; +Cc: Jens Gustedt, libc-alpha

[-- Attachment #1: Type: text/plain, Size: 931 bytes --]

On Wed, Jun 21, 2023 at 4:21 AM Joseph Myers <joseph@codesourcery.com>
wrote:
>
> Why?  You do realise that the DIS ballot resolution isn't until 2024, and

This patch dropped.

> it's entirely plausible that we end up with an FDIS if there are any
> technical comments on the DIS ballot?  We haven't actually discussed
> whether to *call* it C24, or whether to increase the __STDC_VERSION__
> value (and other associated values), yet at the current meeting (if that's
> to be discussed, Other Business would be the natural agenda item), but it
> seems extremely premature to suppose the name will be C23, and rename
> internal interfaces accordingly, when we know WG14 don't be done with it
> until January 2024 at the earliest, or several months later if an FDIS is
> needed.
>
> --
> Joseph S. Myers
> joseph@codesourcery.com



--
         此致
礼
罗勇刚
Yours
    sincerely,
Yonggang Luo

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

end of thread, other threads:[~2023-06-21  6:32 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-19 22:20 [PATCH 0/5] c2y proposal add monotonicwait support for mtx and ctx Yonggang Luo
2023-06-19 22:20 ` [PATCH 1/5] features: Rename __GLIBC_USE_ISOC2X to __GLIBC_USE_ISOC23 Yonggang Luo
2023-06-20 20:21   ` Joseph Myers
2023-06-21  6:32     ` 罗勇刚(Yonggang Luo)
2023-06-19 22:20 ` [PATCH 2/5] time: Implement c23 timespec_get base Yonggang Luo
2023-06-20 12:44   ` Florian Weimer
2023-06-20 16:10     ` 罗勇刚(Yonggang Luo)
2023-06-20 20:25   ` Joseph Myers
2023-06-19 22:20 ` [PATCH 3/5] clang-format: should format with 2 space and do not usage tab Yonggang Luo
2023-06-19 22:20 ` [PATCH 4/5] c11: Switch to use pthread_mutex_clocklock and pthread_cond_clockwait to implement cnd and mtx lock and wait Yonggang Luo
2023-06-20  9:15   ` Florian Weimer
2023-06-19 22:20 ` [PATCH 5/5] c2y: Add function cnd_timedwait_monotonic and mtx_timedlock_monotonic Yonggang Luo
2023-06-20 20:29   ` Joseph Myers

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).