[PATCH v2 4/4] c2y: Add function cnd_timedwait_base and mtx_timedlock_base

Jₑₙₛ Gustedt jens.gustedt@inria.fr
Wed Jun 21 13:23:10 GMT 2023


Hello Florian,

On Wed, 21 Jun 2023 12:40:45 +0200, Florian Weimer wrote:

> There is no reason to duplicate existing POSIX functionality or
> extensions in glibc just because they might be included in a future
> version of the C standard.  Usually, WG14 does not adopt actually
> deployed interfaces, but makes up new ones (despite the “no invention,
> without exception“ still in the charter).

You are exagerating a bit. C23 will integrate a bunch of POSIX
functions, verbatim. There is no "usually" here, it is discussed for
every individual function that we look at. And that is a tedious
case-by-case analysis.

Interfaces for time are a bit special because they were modeled along
POSIX but then changed names and specification of clocks / time bases.

> In that case, we end up with three incompatible interfaces, the
> POSIX one, our C prototype, and the actual C interface.

Yes, that would indeed be not good. The way forward here would be to
propose an integration of the POSIX feature into C2y that would most
probably need a new name and ABI for the reasons I mentioned. Such a
proposal can't happen before mid/end of 2024. If in the meantime one
would want to add a `mtx_…_np` (non-portable) function to a given C
library is certainly debadable. Where this could make sense is for
non-POSIX implementations.

For all of this to make sense, we first need solid implementations of
the three new optional time bases for the existing time interfaces, in
particular for non-POSIX implementations. This would then only make it
interesting for the committees to have new functions in C2y that
depend on these time base and which then, in turn, would make the
whole subset of functions more attractive to our users.


Thanks
Jₑₙₛ

PS: where I am fine to participate in this particular discussion with
glibc on time bases, please remove my name from other tagential
discussions about code identation or stuff like that. Please everybody
be a bit more careful, thanks.

-- 
:: ICube :::::::::::::::::::::::::::::: deputy director ::
:: Université de Strasbourg :::::::::::::::::::::: ICPS ::
:: INRIA Nancy Grand Est :::::::::::::::::::::::: Camus ::
:: :::::::::::::::::::::::::::::::::::: ☎ +33 368854536 ::
:: https://icube-icps.unistra.fr/index.php/Jens_Gustedt ::
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20230621/96b8a1dd/attachment.sig>


More information about the Libc-alpha mailing list