xref: /illumos-gate/usr/src/man/man7/timerfd.7 (revision 8c0b080c8ed055a259d8cd26b9f005211c6a9753)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright (c) 2015, Joyent, Inc. All Rights Reserved.
13.\"
14.Dd Feb 23, 2015
15.Dt TIMERFD 7
16.Os
17.Sh NAME
18.Nm timerfd
19.Nd Linux-compatible timer notification facility
20.Sh SYNOPSIS
21.In sys/timerfd.h
22.Sh DESCRIPTION
23.Nm
24is a Linux-borne facility for creating POSIX timers and
25receiving their subsequent events via a file descriptor.
26The facility itself is arguably unnecessary:
27portable code can either use the timeout value present in
28.Xr poll 2 /
29.Xr port_get 3C
30or -- if this is deemed of unacceptably poor resolution -- create a POSIX timer
31via
32.Xr timer_create 3C
33and use the resulting signal to induce an
34.Sy EINTR
35to polling threads.  (For code that need not be
36portable, the
37.Sy SIGEV_PORT
38signal notification allows for explicit, event-oriented timer notification to be
39sent to a specified port; see
40.Xr signal.h 3HEAD
41for details.) This facility therefore exists only to accommodate Linux-borne
42applications and binaries; it is compatible with its Linux antecedent in both
43binary interface and in semantics.
44.Sh SEE ALSO
45.Xr timerfd_create 3C ,
46.Xr timerfd_gettime 3C ,
47.Xr timerfd_settime 3C
48