Add definition for CLOCK_TAI

Message ID 1416196740-29927-1-git-send-email-etaoins@gmail.com
State Committed
Delegated to: Florian Weimer
Headers

Commit Message

Ryan Cumming Nov. 17, 2014, 3:59 a.m. UTC
  This was introduced in Linux 3.10 to query the current time in TAI
---
 ChangeLog                           | 5 +++++
 sysdeps/unix/sysv/linux/bits/time.h | 2 ++
 2 files changed, 7 insertions(+)
  

Comments

Florian Weimer Nov. 17, 2014, 7:36 a.m. UTC | #1
On 11/17/2014 04:59 AM, Ryan Cumming wrote:
> This was introduced in Linux 3.10 to query the current time in TAI

This is okay.  (I've checked that this matches the Linux definition.)
  
Florian Weimer Nov. 24, 2014, 4:31 p.m. UTC | #2
On 11/24/2014 10:21 AM, Ryan Cumming wrote:
> Ping. Is it possible to get this committed?

Thanks, I have committed this now.  The constant is part of a stable 
kernel release (I checked 3.17.3) with the same value, and this clock is 
expected to be used from userspace.
  

Patch

diff --git a/ChangeLog b/ChangeLog
index ccdf3e7..fc9d8d8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@ 
+2014-11-17  Ryan Cumming  <etaoins@gmail.com>
+
+	[BZ #17608]
+	* sysdeps/unix/sysv/linux/bits/time.h: Define CLOCK_TAI.
+
 2014-11-14  Roland McGrath  <roland@hack.frob.com>
 
 	* signal/signal.h [__USE_MISC]
diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h
index 1080547..eb6da83 100644
--- a/sysdeps/unix/sysv/linux/bits/time.h
+++ b/sysdeps/unix/sysv/linux/bits/time.h
@@ -77,6 +77,8 @@  extern long int __sysconf (int);
 #   define CLOCK_REALTIME_ALARM		8
 /* Like CLOCK_BOOTTIME but also wakes suspended system.  */
 #   define CLOCK_BOOTTIME_ALARM		9
+/* Like CLOCK_REALTIME but in International Atomic Time.  */
+#   define CLOCK_TAI			11
 
 /* Flag to indicate time is absolute.  */
 #   define TIMER_ABSTIME		1