aboutsummaryrefslogtreecommitdiffstats
path: root/man2/timer_create.2
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2023-03-17 17:08:01 +0100
committerAlejandro Colomar <alx@kernel.org>2023-03-30 15:14:55 +0200
commit4131356cdab8d37fc395ca5466a0401c8573380c (patch)
tree8c4c6f1c3172358b735b481cbbfdd9cc04b00ed9 /man2/timer_create.2
parentfd00f831b52d61a91d59cb3b46182869145d9700 (diff)
downloadman-pages-4131356cdab8.tar.gz
man*/, man-pages.7: VERSIONS, STANDARDS, HISTORY: Reorganize sections
- Add a new HISTORY section that covers the history of an API, both regarding implementations and regarding old standards. This was previously covered in VERSIONS, and in some cases in STANDARDS. - Repurpose VERSIONS to cover differing implementations in _current_ systems. - STANDARDS is reduced to only cover current versions of standards. That basically means only C11 (C99 has been superseeded by C11; C17 is just a bugfix of C11, so not really a new version), and POSIX.1-2008 (*-2001 was superseeded by *-2008; *-2017 was just a bugfix for *-2008). The section also mentions for example 'Linux', 'GNU' or 'BSD' when a non-standard API is Linux- or GNU-only or if it's (de-facto) standard in the BSDs. - In some cases content that should go into one of these sections was in NOTES. Move it from there to where it corresponds. - In the SYNOPSIS, I added [[deprecated]] in some functions that I found are deprecated by the relevant standards. - A few other related changes... Cc: Oskari Pirhonen <xxc3ncoredxx@gmail.com> Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'man2/timer_create.2')
-rw-r--r--man2/timer_create.288
1 files changed, 44 insertions, 44 deletions
diff --git a/man2/timer_create.2 b/man2/timer_create.2
index 6d49da17f8..ba5ad78fb3 100644
--- a/man2/timer_create.2
+++ b/man2/timer_create.2
@@ -222,9 +222,51 @@ but the caller did not have the
.B CAP_WAKE_ALARM
capability.
.SH VERSIONS
-This system call is available since Linux 2.6.
+.SS C library/kernel differences
+Part of the implementation of the POSIX timers API is provided by glibc.
+.\" See nptl/sysdeps/unix/sysv/linux/timer_create.c
+In particular:
+.IP \[bu] 3
+Much of the functionality for
+.B SIGEV_THREAD
+is implemented within glibc, rather than the kernel.
+(This is necessarily so,
+since the thread involved in handling the notification is one
+that must be managed by the C library POSIX threads implementation.)
+Although the notification delivered to the process is via a thread,
+internally the NPTL implementation uses a
+.I sigev_notify
+value of
+.B SIGEV_THREAD_ID
+along with a real-time signal that is reserved by the implementation (see
+.BR nptl (7)).
+.IP \[bu]
+The implementation of the default case where
+.I evp
+is NULL is handled inside glibc,
+which invokes the underlying system call with a suitably populated
+.I sigevent
+structure.
+.IP \[bu]
+The timer IDs presented at user level are maintained by glibc,
+which maps these IDs to the timer IDs employed by the kernel.
+.\" See the glibc source file kernel-posix-timers.h for the structure
+.\" that glibc uses to map user-space timer IDs to kernel timer IDs
+.\" The kernel-level timer ID is exposed via siginfo.si_tid.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008.
+POSIX.1-2008.
+.SH HISTORY
+Linux 2.6.
+POSIX.1-2001.
+.PP
+Prior to Linux 2.6,
+glibc provided an incomplete user-space implementation
+.RB ( CLOCK_REALTIME
+timers only) using POSIX threads,
+and before glibc 2.17,
+.\" glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460
+the implementation falls back to this technique on systems
+running kernels older than Linux 2.6.
.SH NOTES
A program may create multiple interval timers using
.BR timer_create ().
@@ -277,48 +319,6 @@ support for POSIX timers is a configurable option that is enabled by default.
Kernel support can be disabled via the
.B CONFIG_POSIX_TIMERS
option.
-.\"
-.SS C library/kernel differences
-Part of the implementation of the POSIX timers API is provided by glibc.
-.\" See nptl/sysdeps/unix/sysv/linux/timer_create.c
-In particular:
-.IP \[bu] 3
-Much of the functionality for
-.B SIGEV_THREAD
-is implemented within glibc, rather than the kernel.
-(This is necessarily so,
-since the thread involved in handling the notification is one
-that must be managed by the C library POSIX threads implementation.)
-Although the notification delivered to the process is via a thread,
-internally the NPTL implementation uses a
-.I sigev_notify
-value of
-.B SIGEV_THREAD_ID
-along with a real-time signal that is reserved by the implementation (see
-.BR nptl (7)).
-.IP \[bu]
-The implementation of the default case where
-.I evp
-is NULL is handled inside glibc,
-which invokes the underlying system call with a suitably populated
-.I sigevent
-structure.
-.IP \[bu]
-The timer IDs presented at user level are maintained by glibc,
-which maps these IDs to the timer IDs employed by the kernel.
-.\" See the glibc source file kernel-posix-timers.h for the structure
-.\" that glibc uses to map user-space timer IDs to kernel timer IDs
-.\" The kernel-level timer ID is exposed via siginfo.si_tid.
-.PP
-The POSIX timers system calls first appeared in Linux 2.6.
-Prior to this,
-glibc provided an incomplete user-space implementation
-.RB ( CLOCK_REALTIME
-timers only) using POSIX threads,
-and before glibc 2.17,
-.\" glibc commit 93a78ac437ba44f493333d7e2a4b0249839ce460
-the implementation falls back to this technique on systems
-running kernels older than Linux 2.6.
.SH EXAMPLES
The program below takes two arguments: a sleep period in seconds,
and a timer frequency in nanoseconds.