From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 9B3343858D33 for ; Tue, 20 Jun 2023 20:29:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9B3343858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="6.00,258,1681200000"; d="scan'208";a="10535868" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 20 Jun 2023 12:29:37 -0800 IronPort-SDR: spngtFeVM2WCCa5yghftCM+glDf3gnG/FepOOLvo/LgTvaB1m7IHx4owzugOZVQDMr+Mhjf4eJ LfBkl5DEoIoE4YJlgNdIUqcAzIDnAe/v1SdKJIaz1JIKeeD8zgbZdmreeyiTbPQlPfmnf9160U DvjcE09HmomAVFUylRPoBxcjadHmdbFSKZ5AZnUPqNJZHl7Rh3SwebsfzrRGbrwIt8p+k+07e7 EehNLHCDMia/M6lT3QzAkAt/w7NuTsBUm12BhpCUfNrGKHn899BJdaPf59l5XW5uwAI1cQ826E 7ng= Date: Tue, 20 Jun 2023 20:29:33 +0000 From: Joseph Myers To: Yonggang Luo CC: Jens Gustedt , Subject: Re: [PATCH 5/5] c2y: Add function cnd_timedwait_monotonic and mtx_timedlock_monotonic In-Reply-To: <20230619222052.682-6-luoyonggang@gmail.com> Message-ID: <36aff14-96a8-4d2b-71fe-b094923e50@codesourcery.com> References: <20230619222052.682-1-luoyonggang@gmail.com> <20230619222052.682-6-luoyonggang@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-12.mgc.mentorg.com (139.181.222.12) To svr-ies-mbx-10.mgc.mentorg.com (139.181.222.10) X-Spam-Status: No, score=-3111.9 required=5.0 tests=BAYES_00,GIT_PATCH_0,HEADER_FROM_DIFFERENT_DOMAINS,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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