* CLOCK_* clockid_t value macros
@ 2002-10-18 13:02 Roland McGrath
2002-10-18 13:09 ` Ulrich Drepper
0 siblings, 1 reply; 2+ messages in thread
From: Roland McGrath @ 2002-10-18 13:02 UTC (permalink / raw)
To: GNU libc hackers
Is there any problem with defining the CLOCK_PROCESS_CPUTIME_ID and
CLOCK_THREAD_CPUTIME_ID macros even on the systems that don't support them?
I would like to consolidate the bits/time.h files and this is the only
actual difference among any of the supported configurations.
It seems fine to me to define them. They are not specified by POSIX.1-2001
(only CLOCK_REALTIME is), but permitted. The spec just says that clock_*
will return EINVAL if given an invalid clockid_t, and so it will for
CLOCK_PROCESS_CPUTIME_ID or CLOCK_THREAD_CPUTIME_ID on systems with no
HP_TIMING support.
I think it's reasonable that programs should need to cope with EINVAL for
these when the macros are present even on machines that currently have
them. One might very well have a libc where e.g. rdtsc has been disabled
for hardware that doesn't support it.
Does anyone see a problem with this?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: CLOCK_* clockid_t value macros
2002-10-18 13:02 CLOCK_* clockid_t value macros Roland McGrath
@ 2002-10-18 13:09 ` Ulrich Drepper
0 siblings, 0 replies; 2+ messages in thread
From: Ulrich Drepper @ 2002-10-18 13:09 UTC (permalink / raw)
To: Roland McGrath; +Cc: GNU libc hackers
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Roland McGrath wrote:
> Is there any problem with defining the CLOCK_PROCESS_CPUTIME_ID and
> CLOCK_THREAD_CPUTIME_ID macros even on the systems that don't support
> them?
> I would like to consolidate the bits/time.h files and this is the only
> actual difference among any of the supported configurations.
In theory it shouldn't be a problem since users have to check
_POSIX_CPUTIME and _POSIX_THREAD_CPUTIME first. But there is definitely
code out there which will break. I don't have personally problems with
this.
- --
- --------------. ,-. 444 Castro Street
Ulrich Drepper \ ,-----------------' \ Mountain View, CA 94041 USA
Red Hat `--' drepper at redhat.com `---------------------------
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE9sGlw2ijCOnn/RHQRAgk2AJ0V0+mzZx5GRgaOVhxA00amaR5uAgCfUz7t
miCO9JQ1hWNrOJuI5vOxEmw=
=pvYV
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-18 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-18 13:02 CLOCK_* clockid_t value macros Roland McGrath
2002-10-18 13:09 ` Ulrich Drepper
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).