mirror of https://github.com/mkerrisk/man-pages
poll.2: Shorten name of timeout argument for ppoll()
The name is overly long, and does not hint at the fact that this argument is a pointer. Fix this by renaming: s/timeout_ts/tmo_p/ Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
32c8dbc049
commit
0bf502fc7f
16
man2/poll.2
16
man2/poll.2
|
@ -42,7 +42,7 @@ poll, ppoll \- wait for some event on a file descriptor
|
|||
.B #include <poll.h>
|
||||
.sp
|
||||
.BI "int ppoll(struct pollfd *" fds ", nfds_t " nfds ", "
|
||||
.BI " const struct timespec *" timeout_ts ", const sigset_t *" sigmask );
|
||||
.BI " const struct timespec *" tmo_p ", const sigset_t *" sigmask );
|
||||
.fi
|
||||
.SH DESCRIPTION
|
||||
.BR poll ()
|
||||
|
@ -254,7 +254,7 @@ argument, the following
|
|||
call:
|
||||
.nf
|
||||
|
||||
ready = ppoll(&fds, nfds, timeout_ts, &sigmask);
|
||||
ready = ppoll(&fds, nfds, tmo_p, &sigmask);
|
||||
|
||||
.fi
|
||||
is equivalent to
|
||||
|
@ -265,8 +265,8 @@ executing the following calls:
|
|||
sigset_t origmask;
|
||||
int timeout;
|
||||
|
||||
timeout = (timeout_ts == NULL) ? \-1 :
|
||||
(timeout_ts\->tv_sec * 1000 + timeout_ts\->tv_nsec / 1000000);
|
||||
timeout = (tmo_p == NULL) ? \-1 :
|
||||
(tmo_p\->tv_sec * 1000 + tmo_p\->tv_nsec / 1000000);
|
||||
pthread_sigmask(SIG_SETMASK, &sigmask, &origmask);
|
||||
ready = poll(&fds, nfds, timeout);
|
||||
pthread_sigmask(SIG_SETMASK, &origmask, NULL);
|
||||
|
@ -291,7 +291,7 @@ only in the precision of the
|
|||
argument).
|
||||
|
||||
The
|
||||
.I timeout_ts
|
||||
.I tmo_p
|
||||
argument specifies an upper limit on the amount of time that
|
||||
.BR ppoll ()
|
||||
will block.
|
||||
|
@ -307,7 +307,7 @@ struct timespec {
|
|||
.in
|
||||
|
||||
If
|
||||
.I timeout_ts
|
||||
.I tmo_p
|
||||
is specified as NULL, then
|
||||
.BR ppoll ()
|
||||
can block indefinitely.
|
||||
|
@ -380,7 +380,7 @@ is closed in another thread, see
|
|||
The Linux
|
||||
.BR ppoll ()
|
||||
system call modifies its
|
||||
.I timeout_ts
|
||||
.I tmo_p
|
||||
argument.
|
||||
However, the glibc wrapper function hides this behavior
|
||||
by using a local variable for the timeout argument that
|
||||
|
@ -388,7 +388,7 @@ is passed to the system call.
|
|||
Thus, the glibc
|
||||
.BR ppoll ()
|
||||
function does not modify its
|
||||
.I timeout_ts
|
||||
.I tmo_p
|
||||
argument.
|
||||
|
||||
The raw
|
||||
|
|
Loading…
Reference in New Issue