]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
Many pages: replace in-line struct timespec declarations with "timespec(3) structure...
authorнаб <nabijaczleweli@nabijaczleweli.xyz>
Mon, 6 Dec 2021 20:12:02 +0000 (21:12 +0100)
committerAlejandro Colomar <alx.manpages@gmail.com>
Mon, 6 Dec 2021 21:11:01 +0000 (22:11 +0100)
Also stripped "as specified in <time.h>" from clock_getres.2,
as it already lives in <time.h>.

Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Signed-off-by: Alejandro Colomar <alx.manpages@gmail.com>
15 files changed:
man2/clock_getres.2
man2/clock_nanosleep.2
man2/io_getevents.2
man2/nanosleep.2
man2/poll.2
man2/sched_rr_get_interval.2
man2/select.2
man2/sigwaitinfo.2
man2/timer_settime.2
man2/timerfd_create.2
man2/utimensat.2
man3/mq_receive.3
man3/mq_send.3
man3/pthread_tryjoin_np.3
man3/sem_wait.3

index c2bb492b91801047529763da6e520344e6cfe047..6de2791ef09f7152bd2f89c2173b3892b2e9858d 100644 (file)
@@ -86,18 +86,8 @@ The
 and
 .I tp
 arguments are
-.I timespec
-structures, as specified in
-.IR <time.h> :
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t   tv_sec;        /* seconds */
-    long     tv_nsec;       /* nanoseconds */
-};
-.EE
-.in
+.BR timespec (3)
+structures.
 .PP
 The
 .I clockid
@@ -539,6 +529,7 @@ main(int argc, char *argv[])
 .BR ftime (3),
 .BR pthread_getcpuclockid (3),
 .BR sysconf (3),
+.BR timespec (3),
 .BR time (7),
 .BR time_namespaces (7),
 .BR vdso (7),
index 1d607e1ced776efdb6f5ead59927b9df6a679fba..491fc06630b359536c2409156db84c33ee0edd53 100644 (file)
@@ -58,17 +58,8 @@ and in allowing the sleep interval to be specified as
 either an absolute or a relative value.
 .PP
 The time values passed to and returned by this call are specified using
-.I timespec
-structures, defined as follows:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;        /* seconds */
-    long   tv_nsec;       /* nanoseconds [0 .. 999999999] */
-};
-.EE
-.in
+.BR timespec (3)
+structures.
 .PP
 The
 .I clockid
@@ -272,5 +263,6 @@ shall have no effect on a thread that is blocked on a relative
 .BR restart_syscall (2),
 .BR timer_create (2),
 .BR sleep (3),
+.BR timespec (3),
 .BR usleep (3),
 .BR time (7)
index 7c7e625bf9b7832be6bcf290aa075668e03dc3b4..0debff2118f443db5e54eae0eb864bcd7a1ac729 100644 (file)
@@ -41,16 +41,9 @@ up to \fInr\fP events from the completion queue of the AIO context
 specified by \fIctx_id\fP.
 .PP
 The \fItimeout\fP argument specifies the amount of time to wait for events,
-and is specified as a relative timeout in a structure of the following form:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;      /* seconds */
-    long   tv_nsec;     /* nanoseconds [0 .. 999999999] */
-};
-.EE
-.in
+and is specified as a relative timeout in a
+.BR timespec (3)
+structure.
 .PP
 The specified time will be rounded up to the system clock granularity
 and is guaranteed not to expire early.
@@ -134,6 +127,7 @@ may cause a segmentation fault instead of generating the error
 .BR io_destroy (2),
 .BR io_setup (2),
 .BR io_submit (2),
+.BR timespec (3),
 .BR aio (7),
 .BR time (7)
 .\" .SH AUTHOR
index 89d8577db1e34354aa37bfda46ee258815593c5f..2484223e0cfc815a0a33732fa1f7e63a8d84a82e 100644 (file)
@@ -76,19 +76,10 @@ can then be used to call
 .BR nanosleep ()
 again and complete the specified pause (but see NOTES).
 .PP
-The structure
-.I timespec
+The
+.BR timespec (3)
+structure
 is used to specify intervals of time with nanosecond precision.
-It is defined as follows:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;        /* seconds */
-    long   tv_nsec;       /* nanoseconds */
-};
-.EE
-.in
 .PP
 The value of the nanoseconds field must be in the range 0 to 999999999.
 .PP
@@ -237,5 +228,6 @@ This problem is fixed in Linux 2.6.0 and later kernels.
 .BR sched_setscheduler (2),
 .BR timer_create (2),
 .BR sleep (3),
+.BR timespec (3),
 .BR usleep (3),
 .BR time (7)
index 205468f3e6e8b8938c252382ef03e150dab3e09a..12c181f9c36a747768d5d4317b56503e91b583e2 100644 (file)
@@ -324,16 +324,9 @@ The
 argument specifies an upper limit on the amount of time that
 .BR ppoll ()
 will block.
-This argument is a pointer to a structure of the following form:
-.PP
-.in +4n
-.EX
-struct timespec {
-    long    tv_sec;         /* seconds */
-    long    tv_nsec;        /* nanoseconds */
-};
-.EE
-.in
+This argument is a pointer to a
+.BR timespec (3)
+structure.
 .PP
 If
 .I tmo_p
@@ -659,5 +652,6 @@ main(int argc, char *argv[])
 .BR restart_syscall (2),
 .BR select (2),
 .BR select_tut (2),
+.BR timespec (3),
 .BR epoll (7),
 .BR time (7)
index 93db938df585592ace265109f4b20bae2e03f894..965a140bf536cc9d54f41b6390b1cdca437294e9 100644 (file)
@@ -38,7 +38,7 @@ sched_rr_get_interval \- get the SCHED_RR interval for the named process
 .SH DESCRIPTION
 .BR sched_rr_get_interval ()
 writes into the
-.I timespec
+.BR timespec (3)
 structure pointed to by
 .I tp
 the round-robin time quantum for the process identified by
@@ -47,19 +47,6 @@ The specified process should be running under the
 .B SCHED_RR
 scheduling policy.
 .PP
-The
-.I timespec
-structure has the following form:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;    /* seconds */
-    long   tv_nsec;   /* nanoseconds */
-};
-.EE
-.in
-.PP
 If
 .I pid
 is zero, the time quantum for the calling process is written into
@@ -132,4 +119,5 @@ Writing 0 to this file resets the quantum to the default value.
 .\" ENOSYS, because SCHED_RR has not yet been fully implemented and tested
 .\" properly.
 .SH SEE ALSO
+.BR timespec (3),
 .BR sched (7)
index aee25c52c0b0a335497aa336c6c9cbd69151b78b..35159731475f0f365ba64a84dc61b8c72a9acebb 100644 (file)
@@ -353,16 +353,9 @@ struct timeval {
 .PP
 The corresponding argument for
 .BR pselect ()
-has the following type:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t      tv_sec;         /* seconds */
-    long        tv_nsec;        /* nanoseconds */
-};
-.EE
-.in
+is a
+.BR timespec (3)
+structure.
 .PP
 On Linux,
 .BR select ()
@@ -761,6 +754,7 @@ main(void)
 .BR send (2),
 .BR sigprocmask (2),
 .BR write (2),
+.BR timespec (3),
 .BR epoll (7),
 .BR time (7)
 .PP
index 00bc50485f5a0d171f489991bdb6febc2f5f131e..c5a2c36c74eec64898915dc0570c2025aa86badf 100644 (file)
@@ -88,16 +88,9 @@ the thread is suspended waiting for a signal.
 (This interval will be rounded up to the system clock granularity,
 and kernel scheduling delays mean that the interval
 may overrun by a small amount.)
-This argument is of the following type:
-.PP
-.in +4n
-.EX
-struct timespec {
-    long    tv_sec;         /* seconds */
-    long    tv_nsec;        /* nanoseconds */
-}
-.EE
-.in
+This argument is a
+.BR timespec (3)
+structure.
 .PP
 If both fields of this structure are specified as 0, a poll is performed:
 .BR sigtimedwait ()
@@ -248,5 +241,6 @@ when the kernel provides it.
 .BR sigqueue (3),
 .BR sigsetops (3),
 .BR sigwait (3),
+.BR timespec (3),
 .BR signal (7),
 .BR time (7)
index 10687b21111d877a3440a70e285a74b54c325c2b..5a9f3576a2d134a11298693ccc42731ba4cb92d8 100644 (file)
@@ -65,11 +65,6 @@ structure is defined as follows:
 .PP
 .in +4n
 .EX
-struct timespec {
-    time_t tv_sec;                /* Seconds */
-    long   tv_nsec;               /* Nanoseconds */
-};
-
 struct itimerspec {
     struct timespec it_interval;  /* Timer interval */
     struct timespec it_value;     /* Initial expiration */
@@ -80,7 +75,7 @@ struct itimerspec {
 Each of the substructures of the
 .I itimerspec
 structure is a
-.I timespec
+.BR timespec (3)
 structure that allows a time value to be specified
 in seconds and nanoseconds.
 These time values are measured according to the clock
@@ -214,4 +209,5 @@ See
 .SH SEE ALSO
 .BR timer_create (2),
 .BR timer_getoverrun (2),
+.BR timespec (3),
 .BR time (7)
index 65fdfcc450790b67e57bec526fd0f458f3e74bb4..31b3d524b9d77724e8d6b8e604a42302897b61c1 100644 (file)
@@ -152,16 +152,12 @@ argument specifies the initial expiration and interval for the timer.
 The
 .I itimerspec
 structure used for this argument contains two fields,
-each of which is in turn a structure of type
-.IR timespec :
+each of which is in turn a
+.BR timespec (3)
+structure:
 .PP
 .in +4n
 .EX
-struct timespec {
-    time_t tv_sec;                /* Seconds */
-    long   tv_nsec;               /* Nanoseconds */
-};
-
 struct itimerspec {
     struct timespec it_interval;  /* Interval for periodic timer */
     struct timespec it_value;     /* Initial expiration */
@@ -722,5 +718,6 @@ main(int argc, char *argv[])
 .BR timer_create (2),
 .BR timer_gettime (2),
 .BR timer_settime (2),
+.BR timespec (3),
 .BR epoll (7),
 .BR time (7)
index cb5f6b6938de648ae74aa71133e80f7d72a43dd4..a1ff452caa7b38d7b199e780eefc650be04b74d9 100644 (file)
@@ -88,16 +88,9 @@ Each of the elements of
 .I times
 specifies a time as the number of seconds and nanoseconds
 since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
-This information is conveyed in a structure of the following form:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;        /* seconds */
-    long   tv_nsec;       /* nanoseconds */
-};
-.EE
-.in
+This information is conveyed in a
+.BR timespec (3)
+structure.
 .PP
 Updated file timestamps are set to the greatest value
 supported by the filesystem that is not greater than the specified time.
@@ -629,6 +622,7 @@ instead checks whether the
 .BR stat (2),
 .BR utimes (2),
 .BR futimes (3),
+.BR timespec (3),
 .BR inode (7),
 .BR path_resolution (7),
 .BR symlink (7)
index df463297df20b2c8567444d52a5bbb1d6f6638a2..c68949b9cc5a7c065bc370677b900292c18b92c3 100644 (file)
@@ -92,16 +92,9 @@ flag is not enabled for the message queue description, then
 points to a structure which specifies how long the call will block.
 This value is an absolute timeout in seconds and nanoseconds
 since the Epoch, 1970-01-01 00:00:00 +0000 (UTC),
-specified in the following structure:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;        /* seconds */
-    long   tv_nsec;       /* nanoseconds */
-};
-.EE
-.in
+specified in a
+.BR timespec (3)
+structure.
 .PP
 If no message is available,
 and the timeout has already expired by the time of the call,
@@ -183,5 +176,6 @@ is a library function layered on top of that system call.
 .BR mq_open (3),
 .BR mq_send (3),
 .BR mq_unlink (3),
+.BR timespec (3),
 .BR mq_overview (7),
 .BR time (7)
index 54999f4407735432596aea71be18fc8c06c302ba..df545155561547355547ca9ad64ebb1d7dc948d1 100644 (file)
@@ -101,16 +101,9 @@ flag is not enabled for the message queue description, then
 points to a structure which specifies how long the call will block.
 This value is an absolute timeout in seconds and nanoseconds
 since the Epoch, 1970-01-01 00:00:00 +0000 (UTC),
-specified in the following structure:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;        /* seconds */
-    long   tv_nsec;       /* nanoseconds */
-};
-.EE
-.in
+specified in a
+.BR timespec (3)
+structure.
 .PP
 If the message queue is full,
 and the timeout has already expired by the time of the call,
@@ -191,5 +184,6 @@ is a library function layered on top of that system call.
 .BR mq_open (3),
 .BR mq_receive (3),
 .BR mq_unlink (3),
+.BR timespec (3),
 .BR mq_overview (7),
 .BR time (7)
index e912f8e3bed8b8b79e58df28f2578ebe9497de27..98a81a1da2b8ea6272eb0e619bd5aed9ee7c137a 100644 (file)
@@ -72,18 +72,11 @@ terminates,
 the call returns an error.
 The
 .I abstime
-argument is a structure of the following form,
+argument is a
+.BR timespec (3)
+structure,
 specifying an absolute time measured since the Epoch (see
-.BR time (2)):
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;     /* seconds */
-    long   tv_nsec;    /* nanoseconds */
-};
-.EE
-.in
+.BR time (2)).
 .SH RETURN VALUE
 On success,
 these functions return 0;
@@ -178,4 +171,5 @@ if (s != 0) {
 .BR clock_gettime (2),
 .BR pthread_exit (3),
 .BR pthread_join (3),
+.BR timespec (3),
 .BR pthreads (7)
index bc7988a1aff19b96bd2ed4e2f87af4f98a65b766..bc8f0c725997369bc780ce24c7fb0646301d3fe1 100644 (file)
@@ -76,18 +76,10 @@ specifies a limit on the amount of time that the call
 should block if the decrement cannot be immediately performed.
 The
 .I abs_timeout
-argument points to a structure that specifies an absolute timeout
+argument points to a
+.BR timespec (3)
+structure that specifies an absolute timeout
 in seconds and nanoseconds since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
-This structure is defined as follows:
-.PP
-.in +4n
-.EX
-struct timespec {
-    time_t tv_sec;      /* Seconds */
-    long   tv_nsec;     /* Nanoseconds [0 .. 999999999] */
-};
-.EE
-.in
 .PP
 If the timeout has already expired by the time of the call,
 and the semaphore could not be locked immediately,
@@ -270,5 +262,6 @@ main(int argc, char *argv[])
 .BR clock_gettime (2),
 .BR sem_getvalue (3),
 .BR sem_post (3),
+.BR timespec (3),
 .BR sem_overview (7),
 .BR time (7)