diff options
author | John Baldwin <jhb@FreeBSD.org> | 2016-07-15 15:12:56 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2016-07-15 15:12:56 +0000 |
commit | 463970da7b4ccd44981e325dac9b24c12ccd3da6 (patch) | |
tree | 8559a968ac852a998f0614b99054762535b1e365 /share/man/man4/aio.4 | |
parent | bcc238eaed81ae213451f19296336873728019dc (diff) | |
download | src-463970da7b4ccd44981e325dac9b24c12ccd3da6.tar.gz src-463970da7b4ccd44981e325dac9b24c12ccd3da6.zip |
Add documentation for the sigevent structure.
- Add a sigevent(3) manpage to give a general overview of the sigevent
structure and the available notification mechanisms.
- Document that AIO requests contain a nested sigevent structure that can
be used to request completion notification.
- Expand the sigevent details in other manuals to note details such as
the extra values stored in a queued signal's information or in a posted
kevent.
Reviewed by: kib
MFC after: 3 days
Differential Revision: https://reviews.freebsd.org/D7122
Notes
Notes:
svn path=/head/; revision=302899
Diffstat (limited to 'share/man/man4/aio.4')
-rw-r--r-- | share/man/man4/aio.4 | 51 |
1 files changed, 50 insertions, 1 deletions
diff --git a/share/man/man4/aio.4 b/share/man/man4/aio.4 index f973639672a2..460b3c88c17a 100644 --- a/share/man/man4/aio.4 +++ b/share/man/man4/aio.4 @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 1, 2016 +.Dd July 15, 2016 .Dt AIO 4 .Os .Sh NAME @@ -137,6 +137,54 @@ The number of outstanding asynchronous I/O requests system-wide. The maximum number of outstanding asynchronous I/O requests permitted system-wide. .El +.Pp +Asynchronous I/O control buffers should be zeroed before initializing +individual fields. +This ensures all fields are initialized. +.Pp +All asynchronous I/O control buffers contain a +.Vt sigevent +structure in the +.Va aio_sigevent +field which can be used to request notification when an operation completes. +.Pp +For +.Dv SIGEV_KEVENT +notifications, +the posted kevent will contain: +.Bl -column ".Va filter" +.It Sy Member Ta Sy Value +.It Va ident Ta asynchronous I/O control buffer pointer +.It Va filter Ta Dv EVFILT_AIO +.It Va udata Ta +value stored in +.Va aio_sigevent.sigev_value +.El +.Pp +For +.Dv SIGEV_SIGNO +and +.Dv SIGEV_THREAD_ID +notifications, +the information for the queued signal will include +.Dv SI_ASYNCIO +in the +.Va si_code +field and the value stored in +.Va sigevent.sigev_value +in the +.Va si_value +field. +.Pp +For +.Dv SIGEV_THREAD +notifications, +the value stored in +.Va aio_sigevent.sigev_value +is passed to the +.Va aio_sigevent.sigev_notify_function +as described in +.Xr sigevent 3 . .Sh SEE ALSO .Xr aio_cancel 2 , .Xr aio_error 2 , @@ -146,6 +194,7 @@ system-wide. .Xr aio_waitcomplete 2 , .Xr aio_write 2 , .Xr lio_listio 2 , +.Xr sigevent 3 , .Xr sysctl 8 .Sh HISTORY The |