summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2013-09-05 12:55:47 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2013-09-05 12:55:47 +0200
commit78638aae3035d85ca027c003f480ff5d7921fac0 (patch)
tree4bdb79686c028567215120b1c9b5dd00df675478
parent783d6cb45442ca83d1be338b22ce22e7181d0b9d (diff)
clock_getres.2: Note circumstances in which "SMP" note applies.
Reported-by: Rodrigo Campos <rodrigo@sdfg.com.ar> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man2/clock_getres.218
1 files changed, 14 insertions, 4 deletions
diff --git a/man2/clock_getres.2 b/man2/clock_getres.2
index 9e872f62..ae7af1b6 100644
--- a/man2/clock_getres.2
+++ b/man2/clock_getres.2
@@ -221,12 +221,13 @@ are available.
(See also
.BR sysconf (3).)
.SH NOTES
-.SS Note for SMP systems
-The
+.SS Historical note for SMP systems
+Before Linux added kernel support for
.B CLOCK_PROCESS_CPUTIME_ID
and
-.B CLOCK_THREAD_CPUTIME_ID
-clocks are realized on many platforms using timers from the CPUs
+.BR CLOCK_THREAD_CPUTIME_ID ,
+glibc implemented these clocks on many platforms using timer
+registers from the CPUs
(TSC on i386, AR.ITC on Itanium).
These registers may differ between CPUs and as a consequence
these clocks may return
@@ -252,6 +253,15 @@ Glibc contains no provisions to deal with these offsets (unlike the Linux
Kernel).
Typically these offsets are small and therefore the effects may be
negligible in most cases.
+
+Since glibc 2.4,
+the wrapper functions for the system calls described in this page avoid
+the abovementioned problems by employing the kernel implementation of
+.B CLOCK_PROCESS_CPUTIME_ID
+and
+.BR CLOCK_THREAD_CPUTIME_ID ,
+on systems that provide such an implementation
+(i.e., Linux 2.6.12 and later).
.SH BUGS
According to POSIX.1-2001, a process with "appropriate privileges" may set the
.B CLOCK_PROCESS_CPUTIME_ID