mirror of https://github.com/mkerrisk/man-pages
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>
This commit is contained in:
parent
783d6cb454
commit
78638aae30
|
@ -221,12 +221,13 @@ are available.
|
||||||
(See also
|
(See also
|
||||||
.BR sysconf (3).)
|
.BR sysconf (3).)
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
.SS Note for SMP systems
|
.SS Historical note for SMP systems
|
||||||
The
|
Before Linux added kernel support for
|
||||||
.B CLOCK_PROCESS_CPUTIME_ID
|
.B CLOCK_PROCESS_CPUTIME_ID
|
||||||
and
|
and
|
||||||
.B CLOCK_THREAD_CPUTIME_ID
|
.BR CLOCK_THREAD_CPUTIME_ID ,
|
||||||
clocks are realized on many platforms using timers from the CPUs
|
glibc implemented these clocks on many platforms using timer
|
||||||
|
registers from the CPUs
|
||||||
(TSC on i386, AR.ITC on Itanium).
|
(TSC on i386, AR.ITC on Itanium).
|
||||||
These registers may differ between CPUs and as a consequence
|
These registers may differ between CPUs and as a consequence
|
||||||
these clocks may return
|
these clocks may return
|
||||||
|
@ -252,6 +253,15 @@ Glibc contains no provisions to deal with these offsets (unlike the Linux
|
||||||
Kernel).
|
Kernel).
|
||||||
Typically these offsets are small and therefore the effects may be
|
Typically these offsets are small and therefore the effects may be
|
||||||
negligible in most cases.
|
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
|
.SH BUGS
|
||||||
According to POSIX.1-2001, a process with "appropriate privileges" may set the
|
According to POSIX.1-2001, a process with "appropriate privileges" may set the
|
||||||
.B CLOCK_PROCESS_CPUTIME_ID
|
.B CLOCK_PROCESS_CPUTIME_ID
|
||||||
|
|
Loading…
Reference in New Issue