Question about non-__BSD_VISIBLE guarded CLOCK_* constants

Garrett Cooper gcooper at FreeBSD.org
Mon Nov 8 05:31:37 UTC 2010


    None of the following constants in time.h are guarded by
__BSD_VISIBLE, __FreeBSD__, etc, even though other sections of the
file are blocked off that way (and the comments suggest that they're
FreeBSD-specific). I was wondering why that's the case...

#define CLOCK_UPTIME    5               /* FreeBSD-specific. */
#define CLOCK_UPTIME_PRECISE    7       /* FreeBSD-specific. */
#define CLOCK_UPTIME_FAST       8       /* FreeBSD-specific. */
#define CLOCK_REALTIME_PRECISE  9       /* FreeBSD-specific. */
#define CLOCK_REALTIME_FAST     10      /* FreeBSD-specific. */
#define CLOCK_MONOTONIC_PRECISE 11      /* FreeBSD-specific. */
#define CLOCK_MONOTONIC_FAST    12      /* FreeBSD-specific. */
#define CLOCK_SECOND    13              /* FreeBSD-specific. */

    Also, they're blocked off by #if !defined(CLOCK_REALTIME) &&
__POSIX_VISIBLE >= 200112 , which doesn't seem to make sense, given
that it's an "advanced realtime" feature, according to POSIX 2008.
Thanks!
-Garrett


More information about the freebsd-standards mailing list