XenevaOS
Loading...
Searching...
No Matches
time.h
Go to the documentation of this file.
1#ifndef __LINUX_TIME_H__
2#define __LINUX_TIME_H__
3
4/*
5 * DCL <linux/time.h> -- the POSIX clock IDs.
6 *
7 * mainline keeps these in uapi/linux/time.h and reaches them through
8 * linux/time.h; DCL's tree is flat with no uapi/ layer, so this header is the
9 * uapi block and nothing else. Copied verbatim (upstream path and tag below)
10 * because every value is an ABI constant: CLOCK_MONOTONIC is 1 because that
11 * is what userspace passes to clock_gettime(), and hrtimer_setup() records it
12 * in the timer's mode word.
13 *
14 * upstream include/uapi/linux/time.h (mainline v7.2)
15 *
16 * Not here yet: struct timespec/timeval/itimerspec, which uapi/linux/time.h
17 * also defines. Nothing in stages 3-7 names them, so they are left to the
18 * first caller rather than transcribed on spec -- see the rule at the top of
19 * linux/cleanup.h about not carrying a speculative surface.
20 */
21
22/*
23 * The IDs of the various system clocks (for POSIX.1b interval timers):
24 */
25#define CLOCK_REALTIME 0
26#define CLOCK_MONOTONIC 1
27#define CLOCK_PROCESS_CPUTIME_ID 2
28#define CLOCK_THREAD_CPUTIME_ID 3
29#define CLOCK_MONOTONIC_RAW 4
30#define CLOCK_REALTIME_COARSE 5
31#define CLOCK_MONOTONIC_COARSE 6
32#define CLOCK_BOOTTIME 7
33#define CLOCK_REALTIME_ALARM 8
34#define CLOCK_BOOTTIME_ALARM 9
35/*
36 * The driver implementing this got removed. The clock ID is kept as a
37 * place holder. Do not reuse!
38 */
39#define CLOCK_SGI_CYCLE 10
40#define CLOCK_TAI 11
41
42#endif /* __LINUX_TIME_H__ */