svn commit: branches/uClibc-nptl/librt

sjhill at uclibc.org sjhill at uclibc.org
Sat Feb 25 16:38:56 UTC 2006


Author: sjhill
Date: 2006-02-25 08:38:56 -0800 (Sat, 25 Feb 2006)
New Revision: 14280

Log:
Grrr.


Added:
   branches/uClibc-nptl/librt/kernel-posix-cpu-timers.h


Changeset:
Added: branches/uClibc-nptl/librt/kernel-posix-cpu-timers.h
===================================================================
--- branches/uClibc-nptl/librt/kernel-posix-cpu-timers.h	2006-02-25 16:35:30 UTC (rev 14279)
+++ branches/uClibc-nptl/librt/kernel-posix-cpu-timers.h	2006-02-25 16:38:56 UTC (rev 14280)
@@ -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)




More information about the uClibc-cvs mailing list