OSDN Git Service

(split) LDP: Update original to LDP v3.65
[linuxjm/LDP_man-pages.git] / original / man2 / timer_create.2
index ae121f3..d049de5 100644 (file)
@@ -1,6 +1,7 @@
 .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
 .\"     <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" Permission is granted to make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" FIXME: Linux 2.6.39 adds CLOCK_BOOTTIME
 .\" Does this also affect timerfd_create()?
 .\" FIXME: Linux 2.3.0 adds CLOCK_BOOTTIME_ALARM and CLOCK_REALTIME_ALARM
 .\" Does this also affect timerfd_create()?
 .\"
-.TH TIMER_CREATE 2 2010-09-27 Linux "Linux Programmer's Manual"
+.TH TIMER_CREATE 2 2014-01-20 Linux "Linux Programmer's Manual"
 .SH NAME
 timer_create \- create a POSIX per-process timer
 .SH SYNOPSIS
@@ -52,7 +54,7 @@ _POSIX_C_SOURCE\ >=\ 199309L
 creates a new per-process interval timer.
 The ID of the new timer is returned in the buffer pointed to by
 .IR timerid ,
-which must be a non-NULL pointer.
+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.
 
@@ -146,7 +148,7 @@ field specifies a kernel thread ID, that is, the value returned by
 .BR clone (2)
 or
 .BR gettid (2).
-This flag is only intended for use by threading libraries.
+This flag is intended only for use by threading libraries.
 .PP
 Specifying
 .I sevp
@@ -238,16 +240,24 @@ is implemented within glibc, rather than the kernel.
 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 userspace timer IDs to kernel timer IDs
+.\" 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 userspace implementation
+glibc provided an incomplete user-space implementation
 .RB ( CLOCK_REALTIME
 timers only) using POSIX threads,
 and current glibc falls back to this implementation on systems
 running pre-2.6 Linux kernels.
+
+Since Linux 3.10, the
+.IR /proc/[pid]/timers
+file can be used to list the POSIX timers for the process with PID
+.IR pid .
+See
+.BR proc (5)
+for further information.
 .SH EXAMPLE
 The program below takes two arguments: a sleep period in seconds,
 and a timer frequency in nanoseconds.
@@ -279,7 +289,7 @@ Caught signal 34
     overrun count = 10004886
 .fi
 .in
-.SS Program Source
+.SS Program source
 \&
 .nf
 #include <stdlib.h>
@@ -395,6 +405,8 @@ main(int argc, char *argv[])
 }
 .fi
 .SH SEE ALSO
+.ad l
+.nh
 .BR clock_gettime (2),
 .BR setitimer (2),
 .BR timer_delete (2),
@@ -407,3 +419,11 @@ main(int argc, char *argv[])
 .BR sigevent (7),
 .BR signal (7),
 .BR time (7)
+.SH COLOPHON
+This page is part of release 3.65 of the Linux
+.I man-pages
+project.
+A description of the project,
+and information about reporting bugs,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.