text
stringlengths 0
234
|
---|
.br read (2)
|
fails with the error
|
.b einval
|
if the size of the supplied buffer is less than 8 bytes.
|
.ip
|
if the associated clock is either
|
.br clock_realtime
|
or
|
.br clock_realtime_alarm ,
|
the timer is absolute
|
.rb ( tfd_timer_abstime ),
|
and the flag
|
.br tfd_timer_cancel_on_set
|
was specified when calling
|
.br timerfd_settime (),
|
then
|
.br read (2)
|
fails with the error
|
.br ecanceled
|
if the real-time clock undergoes a discontinuous change.
|
(this allows the reading application to discover
|
such discontinuous changes to the clock.)
|
.ip
|
if the associated clock is either
|
.br clock_realtime
|
or
|
.br clock_realtime_alarm ,
|
the timer is absolute
|
.rb ( tfd_timer_abstime ),
|
and the flag
|
.br tfd_timer_cancel_on_set
|
was
|
.i not
|
specified when calling
|
.br timerfd_settime (),
|
then a discontinuous negative change to the clock (e.g.,
|
.br clock_settime (2))
|
may cause
|
.br read (2)
|
to unblock, but return a value of 0 (i.e., no bytes read),
|
if the clock change occurs after the time expired,
|
but before the
|
.br read (2)
|
on the file descriptor.
|
.tp
|
.br poll "(2), " select "(2) (and similar)"
|
the file descriptor is readable
|
(the
|
.br select (2)
|
.i readfds
|
argument; the
|
.br poll (2)
|
.b pollin
|
flag)
|
if one or more timer expirations have occurred.
|
.ip
|
the file descriptor also supports the other file-descriptor
|
multiplexing apis:
|
.br pselect (2),
|
.br ppoll (2),
|
and
|
.br epoll (7).
|
.tp
|
.br ioctl (2)
|
the following timerfd-specific command is supported:
|
.rs
|
.tp
|
.br tfd_ioc_set_ticks " (since linux 3.17)"
|
.\" commit 5442e9fbd7c23172a1c9bc736629cd123a9923f0
|
adjust the number of timer expirations that have occurred.
|
the argument is a pointer to a nonzero 8-byte integer
|
.ri ( uint64_t *)
|
containing the new number of expirations.
|
once the number is set, any waiter on the timer is woken up.
|
the only purpose of this command is to restore the expirations
|
for the purpose of checkpoint/restore.
|
this operation is available only if the kernel was configured with the
|
.br config_checkpoint_restore
|
option.
|
.re
|
.tp
|
.br close (2)
|
when the file descriptor is no longer required it should be closed.
|
when all file descriptors associated with the same timer object
|
have been closed,
|
the timer is disarmed and its resources are freed by the kernel.
|
.\"
|
.ss fork(2) semantics
|
after a
|
.br fork (2),
|
the child inherits a copy of the file descriptor created by
|
.br timerfd_create ().
|
the file descriptor refers to the same underlying
|
timer object as the corresponding file descriptor in the parent,
|
and
|
.br read (2)s
|
in the child will return information about
|
expirations of the timer.
|
.\"
|
.ss execve(2) semantics
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.