[PATCH v2 4/4] c2y: Add function cnd_timedwait_base and mtx_timedlock_base
Joseph Myers
joseph@codesourcery.com
Wed Jun 21 12:09:47 GMT 2023
On Wed, 21 Jun 2023, 罗勇刚(Yonggang Luo) via Libc-alpha wrote:
> I am not testing these patches yet(as a new contributor for glibc, don't
> know how to do that yet),
Please don't post untested patches without marking them very clearly as
untested (and a good reason for them being untested). If you have
difficulty following the documentation on how to test glibc, please seek
help on the libc-help mailing list.
> If we have minimal agreement about this proposal, I'd like to add tests for
> it. But still, I don't think
> __USE_GNU is a good name for it, because it's for C2y or C3x, any better
> option for this, so that it's not GNU restricted, for example, suppose MSVC
> also wants to implement this?
It would be a GNU extension unless and until it's adopted into some
standard.
For example, exp10 was a GNU extension, conditional on __USE_GNU, until it
was added to TS 18661-4; it was then conditioned on __GLIBC_USE
(IEC_60559_FUNCS_EXT) in glibc (commit
412cb261b0d66ef5251d7d1c8276b5c522d943b7), and, when parts of TS 18661-4
were added to C2x, the conditionals in glibc were updated to make exp10
visible for C2x (commit c3ce62cc0bd6e8a33629e2aabb7783a322e9189c).
A similar principle applies to any function added to glibc that's not in a
standard but might be added to one in future: it should be conditional on
__USE_GNU (rarely __USE_MISC in cases of extensions also present in other
Unix-like libcs) and the conditional is changed in future if added to a
standard.
This generally applies even if the interface name matches a pattern
reserved in ISO C (for example, strdup - added to ISO C in C2x - is only
conditionally declared, even though C90 reserves all str* names).
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list