From b150f5236b5dd8318bb9fef8188517894e3f186c Mon Sep 17 00:00:00 2001 From: Yaakov Selkowitz Date: Mon, 9 Aug 2010 16:47:48 +0000 Subject: Implement POSIX.1-2004 Monotonic Clock. * hires.h: Change hires_us to hires_ns, with nanosecond resolution. (hires_ns::primed_ft): Remove. (hires_ns::nsecs): New prototype. (hires_ns::usecs): Rewrite in terms of nsecs. (hires_ns::resolution): New prototype. * times.cc: Change hires_us to hires_ns. (ntod): Declare. (systime): Remove. (hires_ns::prime): Increase resolution to nanoseconds. (hires_ns::nsecs): Rename usecs to nsecs to reflect increased resolution. Remove justdelta argument. (hires_ns::resolution): New function. (clock_gettime): Accept CLOCK_MONOTONIC. Use EINVAL instead of ENOSYS per POSIX.1-2004. (clock_getres): Ditto. (clock_setres): Use EINVAL instead of ENOSYS to conform with other implementations. * strace.cc (strace::microseconds): Adjust for hires_ns. * sysconf.cc (sca): Set _SC_MONOTONIC_CLOCK to _POSIX_MONOTONIC_CLOCK. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. --- winsup/cygwin/sysconf.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'winsup/cygwin/sysconf.cc') diff --git a/winsup/cygwin/sysconf.cc b/winsup/cygwin/sysconf.cc index 84aced16a..4e14417ae 100644 --- a/winsup/cygwin/sysconf.cc +++ b/winsup/cygwin/sysconf.cc @@ -165,7 +165,7 @@ static struct {cons, {c:IOV_MAX}}, /* 66, _SC_IOV_MAX */ {cons, {c:_POSIX_IPV6}}, /* 67, _SC_IPV6 */ {cons, {c:LINE_MAX}}, /* 68, _SC_LINE_MAX */ - {cons, {c:-1L}}, /* 69, _SC_MONOTONIC_CLOCK */ + {cons, {c:_POSIX_MONOTONIC_CLOCK}}, /* 69, _SC_MONOTONIC_CLOCK */ {cons, {c:_POSIX_RAW_SOCKETS}}, /* 70, _SC_RAW_SOCKETS */ {cons, {c:_POSIX_READER_WRITER_LOCKS}}, /* 71, _SC_READER_WRITER_LOCKS */ {cons, {c:_POSIX_REGEXP}}, /* 72, _SC_REGEXP */ -- cgit v1.2.3