0013-man-Fix-markup.patch 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800
  1. From a311701ea7eebff003e88694a391d810485f36e0 Mon Sep 17 00:00:00 2001
  2. From: Guillem Jover <guillem@hadrons.org>
  3. Date: Sat, 20 Jul 2019 21:18:11 +0200
  4. Subject: [PATCH libaio 13/28] man: Fix markup
  5. - Remove unnecessary macro argument quoting.
  6. - Variables, pathnames in italics.
  7. - Keywords in bold.
  8. - Man page references in bold, followed by the man page number.
  9. - Fix TP/TQ macro usage.
  10. Signed-off-by: Guillem Jover <guillem@hadrons.org>
  11. Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
  12. ---
  13. man/io.3 | 38 ++++++++++++++-------------
  14. man/io_cancel.3 | 23 ++++++++++------
  15. man/io_fsync.3 | 9 ++++---
  16. man/io_getevents.3 | 33 ++++++++++++++++-------
  17. man/io_prep_fsync.3 | 59 ++++++++++++++++++++++++++++++------------
  18. man/io_prep_pread.3 | 19 +++++---------
  19. man/io_prep_pwrite.3 | 14 ++++------
  20. man/io_queue_init.3 | 34 +++++++++++++++---------
  21. man/io_queue_release.3 | 16 +++++++-----
  22. man/io_queue_run.3 | 18 ++++++++-----
  23. man/io_queue_wait.3 | 25 +++++++++++-------
  24. man/io_set_callback.3 | 5 ++--
  25. man/io_submit.3 | 26 +++++++++++--------
  26. 13 files changed, 195 insertions(+), 124 deletions(-)
  27. diff --git a/man/io.3 b/man/io.3
  28. index 922fbca..f40da41 100644
  29. --- a/man/io.3
  30. +++ b/man/io.3
  31. @@ -10,16 +10,18 @@ io \- Asynchronous IO
  32. .sp
  33. .fi
  34. .SH DESCRIPTION
  35. -The libaio library defines a new set of I/O operations which can
  36. +The
  37. +.B libaio
  38. +library defines a new set of I/O operations which can
  39. significantly reduce the time an application spends waiting at I/O. The
  40. new functions allow a program to initiate one or more I/O operations and
  41. then immediately resume normal work while the I/O operations are
  42. executed in parallel.
  43. These functions are part of the library with realtime functions named
  44. -.IR libaio .
  45. +.BR libaio .
  46. They are not actually part of the
  47. -.IR "libc"
  48. +.B libc
  49. binary.
  50. The implementation of these functions can be done using support in the
  51. kernel.
  52. @@ -27,9 +29,9 @@ kernel.
  53. All IO operations operate on files which were opened previously. There
  54. might be arbitrarily many operations running for one file. The
  55. asynchronous I/O operations are controlled using a data structure named
  56. -.IR "struct iocb"
  57. +.B struct iocb
  58. It is defined in
  59. -.IR "libaio.h"
  60. +.I libaio.h
  61. as follows.
  62. .nf
  63. @@ -74,7 +76,7 @@ struct iocb {
  64. .fi
  65. .TP
  66. -.IR "int aio_fildes"
  67. +.BI int " aio_fildes"
  68. This element specifies the file descriptor to be used for the
  69. operation. It must be a legal descriptor, otherwise the operation will
  70. fail.
  71. @@ -82,55 +84,55 @@ fail.
  72. The device on which the file is opened must allow the seek operation.
  73. I.e., it is not possible to use any of the IO operations on devices
  74. like terminals where an
  75. -.IR "lseek"
  76. +.BR lseek (2)
  77. call would lead to an error.
  78. .TP
  79. -.IR "long u.c.offset"
  80. +.BI long " u.c.offset"
  81. This element specifies the offset in the file at which the operation (input
  82. or output) is performed. Since the operations are carried out in arbitrary
  83. order and more than one operation for one file descriptor can be
  84. started, one cannot expect a current read/write position of the file
  85. descriptor.
  86. .TP
  87. -.IR "void *buf"
  88. +.BI "void *" buf
  89. This is a pointer to the buffer with the data to be written or the place
  90. where the read data is stored.
  91. .TP
  92. -.IR "long u.c.nbytes"
  93. +.BI long " u.c.nbytes"
  94. This element specifies the length of the buffer pointed to by
  95. .IR io_buf .
  96. .TP
  97. -.IR "int aio_reqprio"
  98. +.BI int " aio_reqprio"
  99. Is not currently used.
  100. .TP
  101. .B "IO_CMD_PREAD"
  102. Start a read operation. Read from the file at position
  103. -.IR "u.c.offset"
  104. +.I u.c.offset
  105. and store the next
  106. -.IR "u.c.nbytes"
  107. +.I u.c.nbytes
  108. bytes in the
  109. buffer pointed to by
  110. .IR buf .
  111. .TP
  112. .B "IO_CMD_PWRITE"
  113. Start a write operation. Write
  114. -.IR "u.c.nbytes"
  115. +.I u.c.nbytes
  116. bytes starting at
  117. -.IR "buf"
  118. +.I buf
  119. into the file starting at position
  120. .IR u.c.offset .
  121. .TP
  122. .B "IO_CMD_NOP"
  123. Do nothing for this control block. This value is useful sometimes when
  124. an array of
  125. -.IR "struct iocb"
  126. +.B struct iocb
  127. values contains holes, i.e., some of the
  128. values must not be handled although the whole array is presented to the
  129. -.IR "io_submit"
  130. +.BR io_submit (3)
  131. function.
  132. .TP
  133. .B "IO_CMD_FSYNC"
  134. -.TP
  135. +.TQ
  136. .B "IO_CMD_POLL"
  137. This is experimental.
  138. .SH EXAMPLE
  139. diff --git a/man/io_cancel.3 b/man/io_cancel.3
  140. index a4683be..3ca629b 100644
  141. --- a/man/io_cancel.3
  142. +++ b/man/io_cancel.3
  143. @@ -9,7 +9,7 @@ io_cancel \- Cancel io requests
  144. .B #include <libaio.h>
  145. .sp
  146. .br
  147. -.BI "int io_cancel(io_context_t ctx, struct iocb *iocb)"
  148. +.BI "int io_cancel(io_context_t " ctx ", struct iocb *" iocb ");"
  149. .br
  150. .sp
  151. struct iocb {
  152. @@ -21,8 +21,11 @@ struct iocb {
  153. };
  154. .fi
  155. .SH DESCRIPTION
  156. -Attempts to cancel an iocb previously passed to io_submit. If
  157. -the operation is successfully cancelled, the resulting event is
  158. +Attempts to cancel an
  159. +.I iocb
  160. +previously passed to
  161. +.BR io_submit (3).
  162. +If the operation is successfully cancelled, the resulting event is
  163. copied into the memory pointed to by result without being placed
  164. into the completion queue.
  165. .PP
  166. @@ -33,19 +36,23 @@ have to be overwritten soon. As an example, assume an application, which
  167. writes data in files in a situation where new incoming data would have
  168. to be written in a file which will be updated by an enqueued request.
  169. .SH "RETURN VALUES"
  170. -0 is returned on success, otherwise returns errno.
  171. +\fI0\fP is returned on success, otherwise returns \fIerrno\fP.
  172. .SH ERRORS
  173. .TP
  174. .B EFAULT
  175. If any of the data structures pointed to are invalid.
  176. .TP
  177. .B EINVAL
  178. -If aio_context specified by ctx_id is
  179. -invalid.
  180. +If
  181. +.I aio_context
  182. +specified by
  183. +.I ctx_id
  184. +is invalid.
  185. .TP
  186. .B EAGAIN
  187. -If the iocb specified was not
  188. -cancelled.
  189. +If the
  190. +.I iocb
  191. +specified was not cancelled.
  192. .TP
  193. .B ENOSYS
  194. If not implemented.
  195. diff --git a/man/io_fsync.3 b/man/io_fsync.3
  196. index bc6778a..06538c4 100644
  197. --- a/man/io_fsync.3
  198. +++ b/man/io_fsync.3
  199. @@ -15,7 +15,7 @@ io_fsync \- Synchronize a file's complete in-core state with that on disk
  200. .B #include <libaio.h>
  201. .sp
  202. .br
  203. -.BI "int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd)"
  204. +.BI "int io_fsync(io_context_t " ctx ", struct iocb *" iocb ", io_callback_t " cb ", int " fd ");"
  205. .sp
  206. struct iocb {
  207. void *data;
  208. @@ -40,7 +40,7 @@ Calling this function forces all I/O operations operating queued at the
  209. time of the function call operating on the file descriptor
  210. .IR "iocb->io_fildes"
  211. into the synchronized I/O completion state. The
  212. -.IR "io_fsync"
  213. +.BR io_fsync ()
  214. function returns
  215. immediately but the notification through the method described in
  216. .IR "io_callback"
  217. @@ -49,7 +49,10 @@ file descriptor have terminated and the file is synchronized. This also
  218. means that requests for this very same file descriptor which are queued
  219. after the synchronization request are not affected.
  220. .SH "RETURN VALUES"
  221. -Returns 0, otherwise returns errno.
  222. +Returns
  223. +.BR 0 ,
  224. +otherwise returns
  225. +.IR errno .
  226. .SH ERRORS
  227. .TP
  228. .B EFAULT
  229. diff --git a/man/io_getevents.3 b/man/io_getevents.3
  230. index 05b2507..6fbcc24 100644
  231. --- a/man/io_getevents.3
  232. +++ b/man/io_getevents.3
  233. @@ -42,19 +42,25 @@ struct io_event {
  234. unsigned PADDED(res2, __pad4);
  235. };
  236. .sp
  237. -.BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");"
  238. -.BI "int io_pgetevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ", sigset_t *" sigmask ");"
  239. +.BI "int io_getevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ");"
  240. +.BI "int io_pgetevents(io_context_t " ctx ", long " nr ", struct io_event *" events "[], struct timespec *" timeout ", sigset_t *" sigmask ");"
  241. .fi
  242. .SH DESCRIPTION
  243. -Attempts to read up to nr events from
  244. -the completion queue for the aio_context specified by ctx.
  245. +Attempts to read up to
  246. +.I nr
  247. +events from the completion queue for the aio_context specified by
  248. +.IR ctx .
  249. .SH "RETURN VALUES"
  250. May return
  251. -0 if no events are available and the timeout specified
  252. -by when has elapsed, where when == NULL specifies an infinite
  253. +.B 0
  254. +if no events are available and the timeout specified
  255. +by when has elapsed, where
  256. +.I when
  257. +== NULL specifies an infinite
  258. timeout. Note that the timeout pointed to by when is relative and
  259. -will be updated if not NULL and the operation blocks. Will fail
  260. -with ENOSYS if not implemented.
  261. +will be updated if not NULL and the operation blocks. Will fail with
  262. +.B ENOSYS
  263. +if not implemented.
  264. .SS io_pgetevents()
  265. The relationship between
  266. .BR io_getevents ()
  267. @@ -110,8 +116,15 @@ behaves the same as
  268. .SH ERRORS
  269. .TP
  270. .B EINVAL
  271. -If ctx_id is invalid, if min_nr is out of range,
  272. -if nr is out of range, if when is out of range.
  273. +If
  274. +.I ctx_id
  275. +is invalid, if
  276. +.I min_nr
  277. +is out of range, if
  278. +.I nr
  279. +is out of range, if
  280. +.I when
  281. +is out of range.
  282. .TP
  283. .B EFAULT
  284. If any of the memory specified to is invalid.
  285. diff --git a/man/io_prep_fsync.3 b/man/io_prep_fsync.3
  286. index bc0c43b..d332709 100644
  287. --- a/man/io_prep_fsync.3
  288. +++ b/man/io_prep_fsync.3
  289. @@ -16,7 +16,7 @@ io_prep_fsync \- Synchronize a file's complete in-core state with that on disk
  290. .B #include <libaio.h>
  291. .br
  292. .sp
  293. -.BI "static inline void io_prep_fsync(struct iocb *iocb, int fd)"
  294. +.BI "static inline void io_prep_fsync(struct iocb *" iocb ", int " fd ");"
  295. .sp
  296. struct iocb {
  297. void *data;
  298. @@ -28,47 +28,72 @@ struct iocb {
  299. .sp
  300. .fi
  301. .SH DESCRIPTION
  302. -This is an inline convenience function for setting up an iocbv for a FSYNC request.
  303. -.br
  304. +This is an inline convenience function for setting up an
  305. +.I iocbv
  306. +for a
  307. +.B FSYNC
  308. +request.
  309. +.
  310. +.PP
  311. The file for which
  312. -.TP
  313. +.nf
  314. .IR "iocb->aio_fildes = fd"
  315. +.fi
  316. is a descriptor is set up with
  317. the command
  318. -.TP
  319. -.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC:
  320. +.nf
  321. +.IR "iocb->aio_lio_opcode = IO_CMD_FSYNC"
  322. +.fi
  323. .
  324. .PP
  325. -The io_prep_fsync() function shall set up an IO_CMD_FSYNC operation
  326. -to asynchronously force all I/O
  327. +The
  328. +.BR io_prep_fsync ()
  329. +function shall set up an
  330. +.B IO_CMD_FSYNC
  331. +operation to asynchronously force all I/O
  332. operations associated with the file indicated by the file
  333. -descriptor aio_fildes member of the iocb structure referenced by
  334. +descriptor
  335. +.I aio_fildes
  336. +member of the
  337. +.I iocb
  338. +structure referenced by
  339. the iocb argument and queued at the time of the call to
  340. -io_submit() to the synchronized I/O completion state. The function
  341. +.BR io_submit ()
  342. +to the synchronized I/O completion state. The function
  343. call shall return when the synchronization request has been
  344. initiated or queued to the file or device (even when the data
  345. cannot be synchronized immediately).
  346. All currently queued I/O operations shall be completed as if by a call
  347. -to fsync(); that is, as defined for synchronized I/O file
  348. +to
  349. +.BR fsync (2);
  350. +that is, as defined for synchronized I/O file
  351. integrity completion. If the
  352. -operation queued by io_prep_fsync() fails, then, as for fsync(),
  353. +operation queued by
  354. +.BR io_prep_fsync ()
  355. +fails, then, as for
  356. +.BR fsync (2),
  357. outstanding I/O operations are not guaranteed to have
  358. been completed.
  359. -If io_prep_fsync() succeeds, then it is only the I/O that was queued
  360. -at the time of the call to io_submit() that is guaranteed to be
  361. +If
  362. +.BR io_prep_fsync ()
  363. +succeeds, then it is only the I/O that was queued
  364. +at the time of the call to
  365. +.BR io_submit (3)
  366. +that is guaranteed to be
  367. forced to the relevant completion state. The completion of
  368. subsequent I/O on the file descriptor is not guaranteed to be
  369. completed in a synchronized fashion.
  370. .PP
  371. This function returns immediately. To schedule the operation, the
  372. function
  373. -.IR io_submit
  374. +.BR io_submit (3)
  375. must be called.
  376. .PP
  377. -Simultaneous asynchronous operations using the same iocb produce
  378. -undefined results.
  379. +Simultaneous asynchronous operations using the same
  380. +.I iocb
  381. +produce undefined results.
  382. .SH "RETURN VALUES"
  383. None.
  384. .SH ERRORS
  385. diff --git a/man/io_prep_pread.3 b/man/io_prep_pread.3
  386. index e981e41..e0756a7 100644
  387. --- a/man/io_prep_pread.3
  388. +++ b/man/io_prep_pread.3
  389. @@ -19,7 +19,7 @@ io_prep_pread \- Set up asynchronous read
  390. .B #include <libaio.h>
  391. .br
  392. .sp
  393. -.BI "inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset)
  394. +.BI "inline void io_prep_pread(struct iocb *" iocb ", int " fd ", void *" buf ", size_t " count ", long long " offset ");"
  395. .
  396. .sp
  397. struct iocb {
  398. @@ -31,32 +31,27 @@ struct iocb {
  399. };
  400. .fi
  401. .SH DESCRIPTION
  402. -.IR io_prep_pread
  403. +.BR io_prep_pread ()
  404. is an inline convenience function designed to facilitate the initialization of
  405. the iocb for an asynchronous read operation.
  406. The first
  407. -.TP
  408. -.IR "iocb->u.c.nbytes = count"
  409. +.I iocb->u.c.nbytes = count
  410. bytes of the file for which
  411. -.TP
  412. -.IR "iocb->aio_fildes = fd"
  413. +.I iocb->aio_fildes = fd
  414. is a descriptor are written to the buffer
  415. starting at
  416. -.TP
  417. .IR "iocb->u.c.buf = buf" .
  418. -.br
  419. Reading starts at the absolute position
  420. -.TP
  421. -.IR "ioc->u.c.offset = offset"
  422. +.I ioc->u.c.offset = offset
  423. in the file.
  424. .PP
  425. This function returns immediately. To schedule the operation, the
  426. function
  427. -.IR io_submit
  428. +.BR io_submit (3)
  429. must be called.
  430. .PP
  431. -Simultaneous asynchronous operations using the same iocb produce
  432. +Simultaneous asynchronous operations using the same \fIiocb\fP produce
  433. undefined results.
  434. .SH "RETURN VALUES"
  435. None.
  436. diff --git a/man/io_prep_pwrite.3 b/man/io_prep_pwrite.3
  437. index f2837b6..b3770b4 100644
  438. --- a/man/io_prep_pwrite.3
  439. +++ b/man/io_prep_pwrite.3
  440. @@ -19,8 +19,8 @@ io_prep_pwrite \- Set up iocb for asynchronous writes
  441. .B #include <libaio.h>
  442. .br
  443. .sp
  444. -.BI "inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset)
  445. -"
  446. +.BI "inline void io_prep_pwrite(struct iocb *" iocb ", int " fd ", void *" buf ", size_t " count ", long long " offset ");"
  447. +.
  448. .sp
  449. struct iocb {
  450. void *data;
  451. @@ -31,27 +31,23 @@ struct iocb {
  452. };
  453. .fi
  454. .SH DESCRIPTION
  455. -io_prep_write is a convenience function for setting up parallel writes.
  456. +.BR io_prep_write ()
  457. +is a convenience function for setting up parallel writes.
  458. The first
  459. -.TP
  460. .IR "iocb->u.c.nbytes = count"
  461. bytes of the file for which
  462. -.TP
  463. .IR "iocb->aio_fildes = fd"
  464. is a descriptor are written from the buffer
  465. starting at
  466. -.TP
  467. .IR "iocb->u.c.buf = buf" .
  468. -.br
  469. Writing starts at the absolute position
  470. -.TP
  471. .IR "ioc->u.c.offset = offset"
  472. in the file.
  473. .PP
  474. This function returns immediately. To schedule the operation, the
  475. function
  476. -.IR io_submit
  477. +.BR io_submit (3)
  478. must be called.
  479. .PP
  480. Simultaneous asynchronous operations using the same iocb produce
  481. diff --git a/man/io_queue_init.3 b/man/io_queue_init.3
  482. index d8753a7..661f377 100644
  483. --- a/man/io_queue_init.3
  484. +++ b/man/io_queue_init.3
  485. @@ -10,25 +10,31 @@ io_queue_init \- Initialize asynchronous io state machine
  486. .B #include <libaio.h>
  487. .br
  488. .sp
  489. -.BI "int io_queue_init(int maxevents, io_context_t *ctx );"
  490. +.BI "int io_queue_init(int " maxevents ", io_context_t *" ctx ");"
  491. .sp
  492. .fi
  493. .SH DESCRIPTION
  494. -.B io_queue_init
  495. -Attempts to create an aio context capable of receiving at least
  496. -.IR maxevents
  497. +.BR io_queue_init ()
  498. +attempts to create an aio context capable of receiving at least
  499. +.I maxevents
  500. events.
  501. -.IR ctx
  502. +.I ctx
  503. must point to an aio context that already exists and must be initialized
  504. to
  505. -.IR 0
  506. +.B 0
  507. before the call.
  508. -If the operation is successful, *cxtp is filled with the resulting handle.
  509. +If the operation is successful,
  510. +.I *cxtp
  511. +is filled with the resulting handle.
  512. .SH "RETURN VALUES"
  513. On success,
  514. -.B io_queue_init
  515. -returns 0. Otherwise, -error is return, where
  516. -error is one of the Exxx values defined in the Errors section.
  517. +.BR io_queue_init ()
  518. +returns
  519. +.BR 0 .
  520. +Otherwise, -error is return, where
  521. +error is one of the Exxx values defined in the
  522. +.B ERRORS
  523. +section.
  524. .SH ERRORS
  525. .TP
  526. .B EFAULT
  527. @@ -37,7 +43,9 @@ referenced data outside of the program's accessible address space.
  528. .TP
  529. .B EINVAL
  530. .I maxevents
  531. -is <= 0 or
  532. +is <=
  533. +.B 0
  534. +or
  535. .IR ctx
  536. is an invalid memory location.
  537. .TP
  538. @@ -46,7 +54,9 @@ Not implemented.
  539. .TP
  540. .B EAGAIN
  541. .IR "maxevents > max_aio_reqs"
  542. -where max_aio_reqs is a tunable value.
  543. +where
  544. +.I max_aio_reqs
  545. +is a tunable value.
  546. .SH "SEE ALSO"
  547. .BR io (3),
  548. .BR io_cancel (3),
  549. diff --git a/man/io_queue_release.3 b/man/io_queue_release.3
  550. index 392a478..7a67141 100644
  551. --- a/man/io_queue_release.3
  552. +++ b/man/io_queue_release.3
  553. @@ -8,7 +8,7 @@ io_queue_release \- Release the context associated with the userspace handle
  554. .B #include <libaio.h>
  555. .br
  556. .sp
  557. -.BI "int io_queue_release(io_context_t ctx)"
  558. +.BI "int io_queue_release(io_context_t " ctx ");"
  559. .sp
  560. .SH DESCRIPTION
  561. .B io_queue_release
  562. @@ -17,16 +17,21 @@ AIOs and block on completion.
  563. .
  564. .SH "RETURN VALUES"
  565. On success,
  566. -.B io_queue_release
  567. -returns 0. Otherwise, -error is return, where
  568. +.BR io_queue_release ()
  569. +returns
  570. +.BR 0 .
  571. +Otherwise, -error is return, where
  572. error is one of the Exxx values defined in the Errors section.
  573. .SH ERRORS
  574. .TP
  575. .B EINVAL
  576. .I ctx
  577. -refers to an uninitialized aio context, the iocb pointed to by
  578. +refers to an uninitialized aio context, the
  579. +.I iocb
  580. +pointed to by
  581. .I iocbs
  582. -contains an improperly initialized iocb,
  583. +contains an improperly initialized
  584. +.IR iocb .
  585. .TP
  586. .B ENOSYS
  587. Not implemented.
  588. @@ -44,4 +49,3 @@ Not implemented.
  589. .BR io_set_callback (3),
  590. .BR io_submit (3),
  591. .BR errno (3).
  592. -
  593. diff --git a/man/io_queue_run.3 b/man/io_queue_run.3
  594. index dc54acd..93e322b 100644
  595. --- a/man/io_queue_run.3
  596. +++ b/man/io_queue_run.3
  597. @@ -9,17 +9,19 @@ io_queue_run \- Handle completed io requests
  598. .B #include <libaio.h>
  599. .br
  600. .sp
  601. -.BI "int io_queue_run(io_context_t ctx );"
  602. +.BI "int io_queue_run(io_context_t " ctx ");"
  603. .sp
  604. .fi
  605. .SH DESCRIPTION
  606. -.B io_queue_run
  607. -Attempts to read all the events from
  608. -the completion queue for the aio_context specified by ctx_id.
  609. +.BR io_queue_run ()
  610. +attempts to read all the events from
  611. +the completion queue for the aio_context specified by
  612. +.IR ctx_id .
  613. .SH "RETURN VALUES"
  614. May return
  615. -0 if no events are available.
  616. -Will fail with -ENOSYS if not implemented.
  617. +.B 0
  618. +if no events are available.
  619. +Will fail with -\fBENOSYS\fP if not implemented.
  620. .SH ERRORS
  621. .TP
  622. .B EFAULT
  623. @@ -28,7 +30,9 @@ referenced data outside of the program's accessible address space.
  624. .TP
  625. .B EINVAL
  626. .I ctx
  627. -refers to an uninitialized aio context, the iocb pointed to by
  628. +refers to an uninitialized aio context, the
  629. +.I iocb
  630. +pointed to by
  631. .I iocbs
  632. contains an improperly initialized iocb.
  633. .TP
  634. diff --git a/man/io_queue_wait.3 b/man/io_queue_wait.3
  635. index 356c3b2..ad5e7f4 100644
  636. --- a/man/io_queue_wait.3
  637. +++ b/man/io_queue_wait.3
  638. @@ -9,22 +9,27 @@ io_queue_wait \- Wait for io requests to complete
  639. .B #include <libaio.h>
  640. .br
  641. .sp
  642. -.BI "int io_queue_wait(io_context_t ctx, const struct timespec *timeout);"
  643. +.BI "int io_queue_wait(io_context_t " ctx ", const struct timespec *" timeout ");"
  644. .fi
  645. .SH DESCRIPTION
  646. -Attempts to read an event from
  647. -the completion queue for the aio_context specified by ctx_id.
  648. +.BR io_queue_wait ()
  649. +attempts to read an event from
  650. +the completion queue for the aio_context specified by
  651. +.IR ctx_id .
  652. .SH "RETURN VALUES"
  653. May return
  654. -0 if no events are available and the timeout specified
  655. +.B 0
  656. +if no events are available and the timeout specified
  657. by when has elapsed, where when == NULL specifies an infinite
  658. -timeout. Note that the timeout pointed to by when is relative and
  659. +\fItimeout\fP. Note that the \fItimeout\fP pointed to by when is relative and
  660. will be updated if not NULL and the operation blocks. Will fail
  661. -with -ENOSYS if not implemented.
  662. +with -\fBENOSYS\fP if not implemented.
  663. .SH "RETURN VALUES"
  664. On success,
  665. -.B io_queue_wait
  666. -returns 0. Otherwise, -error is return, where
  667. +.BR io_queue_wait ()
  668. +returns
  669. +.BR 0 .
  670. +Otherwise, -error is return, where
  671. error is one of the Exxx values defined in the Errors section.
  672. .SH ERRORS
  673. .TP
  674. @@ -34,7 +39,9 @@ referenced data outside of the program's accessible address space.
  675. .TP
  676. .B EINVAL
  677. .I ctx
  678. -refers to an uninitialized aio context, the iocb pointed to by
  679. +refers to an uninitialized aio context, the
  680. +.I iocb
  681. +pointed to by
  682. .I iocbs
  683. contains an improperly initialized iocb.
  684. .TP
  685. diff --git a/man/io_set_callback.3 b/man/io_set_callback.3
  686. index 25b9a7f..855f4b9 100644
  687. --- a/man/io_set_callback.3
  688. +++ b/man/io_set_callback.3
  689. @@ -10,7 +10,7 @@ io_set_callback \- Set up io completion callback function
  690. .B #include <libaio.h>
  691. .br
  692. .sp
  693. -.BI "static inline void io_set_callback(struct iocb *iocb, io_callback_t cb)"
  694. +.BI "static inline void io_set_callback(struct iocb *" iocb ", io_callback_t " cb ");"
  695. .sp
  696. struct iocb {
  697. void *data;
  698. @@ -25,7 +25,8 @@ typedef void (*io_callback_t)(io_context_t ctx, struct iocb *iocb, long res, lon
  699. .fi
  700. .SH DESCRIPTION
  701. The callback is not done if the caller uses raw events from
  702. -io_getevents, only with the library helpers.
  703. +.BR io_getevents (3),
  704. +only with the library helpers.
  705. .SH "RETURN VALUES"
  706. None.
  707. .SH ERRORS
  708. diff --git a/man/io_submit.3 b/man/io_submit.3
  709. index 01c25cd..a195653 100644
  710. --- a/man/io_submit.3
  711. +++ b/man/io_submit.3
  712. @@ -32,21 +32,21 @@ struct iocb {
  713. };
  714. .fi
  715. .SH DESCRIPTION
  716. -.B io_submit
  717. +.BR io_submit ()
  718. submits
  719. .I nr
  720. iocbs for processing for a given io context ctx.
  721. The
  722. -.IR "io_submit"
  723. +.BR io_submit ()
  724. function can be used to enqueue an arbitrary
  725. number of read and write requests at one time. The requests can all be
  726. meant for the same file, all for different files or every solution in
  727. between.
  728. -.IR "io_submit"
  729. +.BR io_submit ()
  730. gets the
  731. -.IR "nr"
  732. +.I nr
  733. requests from the array pointed to
  734. by
  735. .IR "iocbs" .
  736. @@ -75,10 +75,10 @@ in which case this element of
  737. .IR "iocbs"
  738. is simply ignored. This
  739. ``operation'' is useful in situations where one has a fixed array of
  740. -.IR "struct iocb"
  741. +.B struct iocb
  742. elements from which only a few need to be handled at
  743. a time. Another situation is where the
  744. -.IR "io_submit"
  745. +.BR io_submit (3)
  746. call was
  747. canceled before all requests are processed and the remaining requests have to be reissued.
  748. @@ -86,15 +86,15 @@ The other members of each element of the array pointed to by
  749. .IR "iocbs"
  750. must have values suitable for the operation as described in
  751. the documentation for
  752. -.IR "io_prep_pread"
  753. +.BR io_prep_pread (3)
  754. and
  755. -.IR "io_prep_pwrite"
  756. +.BR io_prep_pwrite (3)
  757. above.
  758. The function returns immediately after
  759. having enqueued all the requests.
  760. On success,
  761. -.B io_submit
  762. +.BR io_submit ()
  763. returns the number of iocbs submitted successfully. Otherwise, -error is return, where
  764. error is one of the Exxx values defined in the Errors section.
  765. .PP
  766. @@ -115,10 +115,14 @@ refers to an uninitialized aio context, the iocb pointed to by
  767. contains an improperly initialized iocb,
  768. .TP
  769. .B EBADF
  770. -The iocb contains a file descriptor that does not exist.
  771. +The
  772. +.I iocb
  773. +contains a file descriptor that does not exist.
  774. .TP
  775. .B EINVAL
  776. -The file specified in the iocb does not support the given io operation.
  777. +The file specified in the
  778. +.I iocb
  779. +does not support the given io operation.
  780. .SH "SEE ALSO"
  781. .BR io (3),
  782. .BR io_cancel (3),
  783. --
  784. 2.26.0.292.g33ef6b2f38