From 6e8c30a9b99892f23293bd13b7a544197627fa69 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Fri, 22 Jul 2005 08:00:47 +0000 Subject: Added new files for TLS functionality in libpthreads and for the dynamic loader. The headers may be moved to the 'ldso' directory hierarchy at a later date depending on what we run into when implementating changes to the loader. --- .../sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 libpthread/nptl/sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h (limited to 'libpthread/nptl/sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h') diff --git a/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h b/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h new file mode 100644 index 000000000..164a90dde --- /dev/null +++ b/libpthread/nptl/sysdeps/unix/sysv/linux/kernel-posix-cpu-timers.h @@ -0,0 +1,18 @@ +/* Parameters for the Linux kernel ABI for CPU clocks. */ + +#define CPUCLOCK_PID(clock) ((pid_t) ~((clock) >> 3)) +#define CPUCLOCK_PERTHREAD(clock) \ + (((clock) & (clockid_t) CPUCLOCK_PERTHREAD_MASK) != 0) +#define CPUCLOCK_PID_MASK 7 +#define CPUCLOCK_PERTHREAD_MASK 4 +#define CPUCLOCK_WHICH(clock) ((clock) & (clockid_t) CPUCLOCK_CLOCK_MASK) +#define CPUCLOCK_CLOCK_MASK 3 +#define CPUCLOCK_PROF 0 +#define CPUCLOCK_VIRT 1 +#define CPUCLOCK_SCHED 2 +#define CPUCLOCK_MAX 3 + +#define MAKE_PROCESS_CPUCLOCK(pid, clock) \ + ((~(clockid_t) (pid) << 3) | (clockid_t) (clock)) +#define MAKE_THREAD_CPUCLOCK(tid, clock) \ + MAKE_PROCESS_CPUCLOCK((tid), (clock) | CPUCLOCK_PERTHREAD_MASK) -- cgit v1.2.3