Updated to fedora-glibc-20080802T0809
[glibc/history.git] / sysdeps / unix / sysv / linux / kernel-posix-cpu-timers.h
blob164a90ddeb7d1d3e119dd01db5f25e9b83ad4cec
1 /* Parameters for the Linux kernel ABI for CPU clocks. */
3 #define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3))
4 #define CPUCLOCK_PERTHREAD(clock) \
5 (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0)
6 #define CPUCLOCK_PID_MASK 7
7 #define CPUCLOCK_PERTHREAD_MASK 4
8 #define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK)
9 #define CPUCLOCK_CLOCK_MASK 3
10 #define CPUCLOCK_PROF 0
11 #define CPUCLOCK_VIRT 1
12 #define CPUCLOCK_SCHED 2
13 #define CPUCLOCK_MAX 3
15 #define MAKE_PROCESS_CPUCLOCK(pid, clock) \
16 ((~(clockid_t) (pid) << 3) | (clockid_t) (clock))
17 #define MAKE_THREAD_CPUCLOCK(tid, clock) \
18 MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK)