summaryrefslogtreecommitdiffstats
path: root/upstream/debian-unstable/man2/timer_create.2
diff options
context:
space:
mode:
Diffstat (limited to 'upstream/debian-unstable/man2/timer_create.2')
-rw-r--r--upstream/debian-unstable/man2/timer_create.246
1 files changed, 23 insertions, 23 deletions
diff --git a/upstream/debian-unstable/man2/timer_create.2 b/upstream/debian-unstable/man2/timer_create.2
index 3265b27c..2b139c40 100644
--- a/upstream/debian-unstable/man2/timer_create.2
+++ b/upstream/debian-unstable/man2/timer_create.2
@@ -3,7 +3,7 @@
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
-.TH timer_create 2 2023-05-03 "Linux man-pages 6.05.01"
+.TH timer_create 2 2024-05-02 "Linux man-pages 6.8"
.SH NAME
timer_create \- create a POSIX per-process timer
.SH LIBRARY
@@ -13,17 +13,17 @@ Real-time library
.nf
.BR "#include <signal.h>" " /* Definition of " SIGEV_* " constants */"
.B #include <time.h>
-.PP
+.P
.BI "int timer_create(clockid_t " clockid ,
.BI " struct sigevent *_Nullable restrict " sevp ,
.BI " timer_t *restrict " timerid );
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR timer_create ():
.nf
_POSIX_C_SOURCE >= 199309L
@@ -36,7 +36,7 @@ The ID of the new timer is returned in the buffer pointed to by
which must be a non-null pointer.
This ID is unique within the process, until the timer is deleted.
The new timer is initially disarmed.
-.PP
+.P
The
.I clockid
argument specifies the clock that the new timer uses to measure time.
@@ -96,12 +96,12 @@ The caller must have the
capability in order to set a timer against this clock.
.TP
.BR CLOCK_TAI " (since Linux 3.10)"
-A system-wide clock derived from wall-clock time but ignoring leap seconds.
-.PP
+A system-wide clock derived from wall-clock time but counting leap seconds.
+.P
See
.BR clock_getres (2)
for some further details on the above clocks.
-.PP
+.P
As well as the above values,
.I clockid
can be specified as the
@@ -110,7 +110,7 @@ returned by a call to
.BR clock_getcpuclockid (3)
or
.BR pthread_getcpuclockid (3).
-.PP
+.P
The
.I sevp
argument points to a
@@ -118,8 +118,8 @@ argument points to a
structure that specifies how the caller
should be notified when the timer expires.
For the definition and general details of this structure, see
-.BR sigevent (7).
-.PP
+.BR sigevent (3type).
+.P
The
.I sevp.sigev_notify
field can have the following values:
@@ -134,7 +134,7 @@ Upon timer expiration, generate the signal
.I sigev_signo
for the process.
See
-.BR sigevent (7)
+.BR sigevent (3type)
for general details.
The
.I si_code
@@ -152,7 +152,7 @@ Upon timer expiration, invoke
.I sigev_notify_function
as if it were the start function of a new thread.
See
-.BR sigevent (7)
+.BR sigevent (3type)
for details.
.TP
.BR SIGEV_THREAD_ID " (Linux-specific)"
@@ -168,7 +168,7 @@ field specifies a kernel thread ID, that is, the value returned by
or
.BR gettid (2).
This flag is intended only for use by threading libraries.
-.PP
+.P
Specifying
.I sevp
as NULL is equivalent to specifying a pointer to a
@@ -258,7 +258,7 @@ POSIX.1-2008.
.SH HISTORY
Linux 2.6.
POSIX.1-2001.
-.PP
+.P
Prior to Linux 2.6,
glibc provided an incomplete user-space implementation
.RB ( CLOCK_REALTIME
@@ -270,12 +270,12 @@ running kernels older than Linux 2.6.
.SH NOTES
A program may create multiple interval timers using
.BR timer_create ().
-.PP
+.P
Timers are not inherited by the child of a
.BR fork (2),
and are disarmed and deleted during an
.BR execve (2).
-.PP
+.P
The kernel preallocates a "queued real-time signal"
for each timer created using
.BR timer_create ().
@@ -283,7 +283,7 @@ Consequently, the number of timers is limited by the
.B RLIMIT_SIGPENDING
resource limit (see
.BR setrlimit (2)).
-.PP
+.P
The timers created by
.BR timer_create ()
are commonly known as "POSIX (interval) timers".
@@ -304,7 +304,7 @@ Return the overrun count for the last timer expiration.
.TP
.BR timer_delete (2)
Disarm and delete a timer.
-.PP
+.P
Since Linux 3.10, the
.IR /proc/ pid /timers
file can be used to list the POSIX timers for the process with PID
@@ -312,7 +312,7 @@ file can be used to list the POSIX timers for the process with PID
See
.BR proc (5)
for further information.
-.PP
+.P
Since Linux 4.10,
.\" baa73d9e478ff32d62f3f9422822b59dd9a95a21
support for POSIX timers is a configurable option that is enabled by default.
@@ -331,12 +331,12 @@ Assuming that the timer expired at least once while the program slept,
the signal handler will be invoked,
and the handler displays some information about the timer notification.
The program terminates after one invocation of the signal handler.
-.PP
+.P
In the following example run, the program sleeps for 1 second,
after creating a timer that has a frequency of 100 nanoseconds.
By the time the signal is unblocked and delivered,
there have been around ten million overruns.
-.PP
+.P
.in +4n
.EX
$ \fB./a.out 1 100\fP
@@ -482,6 +482,6 @@ main(int argc, char *argv[])
.BR clock_getcpuclockid (3),
.BR pthread_getcpuclockid (3),
.BR pthreads (7),
-.BR sigevent (7),
+.BR sigevent (3type),
.BR signal (7),
.BR time (7)