linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* aio manuals
@ 2011-03-09 18:06 Cyril Hrubis
       [not found] ` <20110309180600.GA14533-n1fJoQsqRnsVI8jrpt9EEQ@public.gmane.org>
  0 siblings, 1 reply; 24+ messages in thread
From: Cyril Hrubis @ 2011-03-09 18:06 UTC (permalink / raw)
  To: mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w
  Cc: linux-man-u79uwXL29TY76Z2rM5mHXA, Jeff Moyer

[-- Attachment #1: Type: text/plain, Size: 663 bytes --]

Hi!
The io_* manuals says that we should use aio_context_t as type for aio
handle. That is wrong as the functions are defined with io_context_t
(libaio.h). Patch attached.

The only oustanding issue is that manual for io_setup says that we must
set the io_context_t to 0 before use. And as the io_context_t is defined
as opaque type (and it's defined as pointer now) the only way to
initalize it without warnigs is memset(&ctxp, 0, sizeof(ctxp));. Perhaps
this is not needed at all, as the ctpx is passed to the syscall and then
initalized in the kernel (at least I haven't seem any checks in the
codepath).

-- 
Cyril Hrubis
chrubis-AlSwsSmVLrQ@public.gmane.org

[-- Attachment #2: io_context_t.patch --]
[-- Type: text/x-patch, Size: 2122 bytes --]

diff --git a/man2/io_cancel.2 b/man2/io_cancel.2
index a3fc213..1e21869 100644
--- a/man2/io_cancel.2
+++ b/man2/io_cancel.2
@@ -32,7 +32,7 @@ io_cancel \- cancel an outstanding asynchronous I/O operation
 .\"#include <linux/aio.h>
 .sp
 .\" .HP 16
-.BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb ,
+.BI "int io_cancel(io_context_t " ctx_id ", struct iocb *" iocb ,
 .BI "              struct io_event *" result );
 .\" .ad
 .\" .hy
diff --git a/man2/io_destroy.2 b/man2/io_destroy.2
index 6a165e1..47d031a 100644
--- a/man2/io_destroy.2
+++ b/man2/io_destroy.2
@@ -31,7 +31,7 @@ io_destroy \- destroy an asynchronous I/O context
 .\" #include <linux/aio.h>
 .sp
 .\" .HP 17
-.BI "int io_destroy(aio_context_t " ctx );
+.BI "int io_destroy(io_context_t " ctx );
 .\" .ad
 .\" .hy
 .sp
diff --git a/man2/io_getevents.2 b/man2/io_getevents.2
index e990f6d..a337404 100644
--- a/man2/io_getevents.2
+++ b/man2/io_getevents.2
@@ -32,7 +32,7 @@ io_getevents \- read asynchronous I/O events from the completion queue
 .\" #include <linux/aio.h>
 .sp
 .\" .HP 19
-.BI "int io_getevents(aio_context_t " ctx_id ", long " min_nr ", long " nr ,
+.BI "int io_getevents(io_context_t " ctx_id ", long " min_nr ", long " nr ,
 .BI "                 struct io_event *" events \
 ", struct timespec *" timeout );
 .\" .ad
diff --git a/man2/io_setup.2 b/man2/io_setup.2
index d9b5117..ea84cb9 100644
--- a/man2/io_setup.2
+++ b/man2/io_setup.2
@@ -31,7 +31,7 @@ io_setup \- create an asynchronous I/O context
 .\" #include <linux/aio.h>
 .sp
 .\" .HP 15
-.BI "int io_setup(unsigned " nr_events ", aio_context_t *" ctxp );
+.BI "int io_setup(unsigned " nr_events ", io_context_t *" ctxp );
 .\" .ad
 .\" .hy
 .sp
diff --git a/man2/io_submit.2 b/man2/io_submit.2
index 1eae429..3b6bbf2 100644
--- a/man2/io_submit.2
+++ b/man2/io_submit.2
@@ -31,7 +31,7 @@ io_submit \- submit asynchronous I/O blocks for processing
 .\" #include <linux/aio.h>
 .sp
 .\" .HP 16
-.BI "int io_submit(aio_context_t " ctx_id ", long " nr \
+.BI "int io_submit(io_context_t " ctx_id ", long " nr \
 ", struct iocb **" iocbpp );
 .\" .ad
 .\" .hy

^ permalink raw reply related	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2013-04-16 10:27 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-09 18:06 aio manuals Cyril Hrubis
     [not found] ` <20110309180600.GA14533-n1fJoQsqRnsVI8jrpt9EEQ@public.gmane.org>
2011-03-09 17:53   ` Jeff Moyer
     [not found]     ` <x49ei6gnpsx.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2011-03-16 10:43       ` Cyril Hrubis
     [not found]         ` <20110316104356.GB32095-n1fJoQsqRnsVI8jrpt9EEQ@public.gmane.org>
2011-03-16 14:26           ` Jeff Moyer
     [not found]             ` <x49pqpr9m5l.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2011-03-16 15:20               ` Cyril Hrubis
     [not found]                 ` <20110316152018.GG2096-n1fJoQsqRnsVI8jrpt9EEQ@public.gmane.org>
2011-10-13  8:29                   ` Cyril Hrubis
     [not found]                     ` <20111013082918.GA17800-n1fJoQsqRnsVI8jrpt9EEQ@public.gmane.org>
2011-10-17 19:53                       ` Jeff Moyer
2012-05-05 12:26                       ` Michael Kerrisk (man-pages)
     [not found]                         ` <CAKgNAkj68CwJFkqYNvz5X5Jt+6xTwVb1eR+vSkXmFYorQvHJ5A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-07 13:44                           ` Jeff Moyer
     [not found]                             ` <x4962c8t8b8.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2012-05-07 20:40                               ` Michael Kerrisk (man-pages)
     [not found]                                 ` <CAKgNAkh9jnybota9W_-iD6Uc6c2pJuMiTus2GLk53ysvCVhhRQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-07 20:52                                   ` Jeff Moyer
2012-05-07 21:14                               ` Michael Kerrisk (man-pages)
     [not found]                                 ` <CAKgNAkjZS0VyV4y6P-NyrLv8_a8G2K6=yFPijef3d3wfQuPwXw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-07 21:21                                   ` Jeff Moyer
2012-05-09 14:27                                   ` Cyril Hrubis
     [not found]                                     ` <20120509142713.GA7912-n1fJoQsqRnsVI8jrpt9EEQ@public.gmane.org>
2012-05-09 23:59                                       ` Michael Kerrisk (man-pages)
     [not found]                                         ` <CAKgNAkjki3nY8awPZ7tSd6D=xErF9J7D_S_QaeKpXHVq4YL+_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-11  8:12                                           ` Michael Kerrisk (man-pages)
     [not found]                                             ` <CAKgNAkg5ukEk_jzH3fouT9pe=HJnV+OhjOL1BzRzxviz67pAgA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-11-12 10:04                                               ` chrubis-AlSwsSmVLrQ
     [not found]                                                 ` <20121112100446.GA6764-J5syqNJeCN7twjQa/ONI9g@public.gmane.org>
2012-11-12 14:26                                                   ` Jeff Moyer
     [not found]                                                     ` <x49vcdakid2.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2012-11-12 16:09                                                       ` chrubis-AlSwsSmVLrQ
     [not found]                                                         ` <20121112160937.GA23439-J5syqNJeCN7twjQa/ONI9g@public.gmane.org>
2013-02-25  8:07                                                           ` Michael Kerrisk (man-pages)
     [not found]                                                             ` <CAKgNAkiG3psL_7A74UV2sLKkCYfMZjts+wCFWdkKbaAO_W2Wuw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-02-27 11:48                                                               ` chrubis-AlSwsSmVLrQ
2013-02-27 13:02                                                                 ` Jeff Moyer
2013-04-16  6:34                                   ` Michael Kerrisk (man-pages)
     [not found]                                     ` <CAKgNAkg0TjfQpyrJtZc63vTH_NPqe2LTMFYrP1ABLCXtx_f4Wg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-04-16 10:27                                       ` chrubis-AlSwsSmVLrQ

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).