io_cancel.2, io_destroy.2, io_getevents.2, io_cancel.2, io_submit.2: SYNOPSIS: s/io_context_t/aio_context_t/
PATCH 1/1 io_cancel.2, io_destroy.2, io_getevents.2, io_cancel.2, io_submit.2: SYNOPSIS: s/io_context_t/aio_context_t/
Linux uses aio_context_t for these syscalls,
and it's the type provided by <linux/aio_abi.h>.
Use it in the SYNOPSIS.
libaio uses 'io_context_t', but that difference is already noted in NOTES.
--- man2/io_cancel.2 | 2 +- man2/io_destroy.2 | 2 +- man2/io_getevents.2 | 2 +- man2/io_setup.2 | 2 +- man2/io_submit.2 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
man2/io_cancel.2 +1 -1
@@ -11,7 +11,7 @@ io_cancel \- cancel an outstanding asynchronous I/O operation .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_cancel(io_context_t " ctx_id ", struct iocb *" iocb , +.BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb , .BI " struct io_event *" result ); .fi .PP
man2/io_destroy.2 +1 -1
@@ -11,7 +11,7 @@ io_destroy \- destroy an asynchronous I/O context .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_destroy(io_context_t " ctx_id ); +.BI "int io_destroy(aio_context_t " ctx_id ); .fi .PP .IR Note :
man2/io_getevents.2 +1 -1
@@ -12,7 +12,7 @@ io_getevents \- read asynchronous I/O events from the completion queue .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .BR "#include <linux/time.h>" " /* Defines 'struct timespec' */" .PP -.BI "int io_getevents(io_context_t " ctx_id ", long " min_nr ", long " nr , +.BI "int io_getevents(aio_context_t " ctx_id ", long " min_nr ", long " nr , .BI " struct io_event *" events \ ", struct timespec *" timeout ); .fi
man2/io_setup.2 +1 -1
@@ -11,7 +11,7 @@ io_setup \- create an asynchronous I/O context .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_setup(unsigned " nr_events ", io_context_t *" ctx_idp ); +.BI "int io_setup(unsigned " nr_events ", aio_context_t *" ctx_idp ); .fi .PP .IR Note :
man2/io_submit.2 +1 -1
@@ -12,7 +12,7 @@ io_submit \- submit asynchronous I/O blocks for processing .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_submit(io_context_t " ctx_id ", long " nr \ +.BI "int io_submit(aio_context_t " ctx_id ", long " nr \ ", struct iocb **" iocbpp ); .fi .PP
Signature · 1 line
2.28.0
Quoted 5 lines · Alejandro Colomar
Linux uses
aio_context_tfor these syscalls,
and it's the type provided by <linux/aio_abi.h>.
Use it in the SYNOPSIS.libaio uses '
io_context_t', but that difference is already noted in NOTES.
Hey Alex,
I think your patch is correct. But I see that I changed these prototypes a few years back after reports from Jeff Moyer and Andi Kleen. The situation is confusing.
Could I ask you to rewrite this patch to add the following immediately after the DESCRIPTION heading in each page:
[[
Note: this page describes the raw Linux system call interface. the wrapper functions provided by _libaio_ use a differnt type for the _ctx_id_ argument. See NOTES.
]]
This will save me or someone else in the future perhaps reverting your fix!
Thanks,
Michael
Quoted 75 lines
Signed-off-by Alejandro Colomar <[email protected]>--- man2/io_cancel.2 | 2 +- man2/io_destroy.2 | 2 +- man2/io_getevents.2 | 2 +- man2/io_setup.2 | 2 +- man2/io_submit.2 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)man2/io_cancel.2 +1
-1@@ -11,7 +11,7 @@ io_cancel \- cancel an outstanding asynchronous I/O operation .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_cancel(io_context_t " ctx_id ", struct iocb *" iocb , +.BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb , .BI " struct io_event *" result ); .fi .PPman2/io_destroy.2 +1
-1@@ -11,7 +11,7 @@ io_destroy \- destroy an asynchronous I/O context .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_destroy(io_context_t " ctx_id ); +.BI "int io_destroy(aio_context_t " ctx_id ); .fi .PP .IR Note :man2/io_getevents.2 +1
-1@@ -12,7 +12,7 @@ io_getevents \- read asynchronous I/O events from the completion queue .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .BR "#include <linux/time.h>" " /* Defines 'struct timespec' */" .PP -.BI "int io_getevents(io_context_t " ctx_id ", long " min_nr ", long " nr , +.BI "int io_getevents(aio_context_t " ctx_id ", long " min_nr ", long " nr , .BI " struct io_event *" events \ ", struct timespec *" timeout ); .fiman2/io_setup.2 +1
-1@@ -11,7 +11,7 @@ io_setup \- create an asynchronous I/O context .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_setup(unsigned " nr_events ", io_context_t *" ctx_idp ); +.BI "int io_setup(unsigned " nr_events ", aio_context_t *" ctx_idp ); .fi .PP .IR Note :man2/io_submit.2 +1
-1@@ -12,7 +12,7 @@ io_submit \- submit asynchronous I/O blocks for processing .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_submit(io_context_t " ctx_id ", long " nr \ +.BI "int io_submit(aio_context_t " ctx_id ", long " nr \ ", struct iocb **" iocbpp ); .fi .PP
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/
PATCH v2 1/1 io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2: SYNOPSIS: s/io_context_t/aio_context_t/
Linux uses aio_context_t for these syscalls,
and it's the type provided by <linux/aio_abi.h>.
Use it in the SYNOPSIS.
libaio uses 'io_context_t', but that difference is already noted in NOTES.
---
Quoted 22 lines · Michael Kerrisk (man-pages)
Quoted 5 lines · Alejandro Colomar
Linux uses
aio_context_tfor these syscalls,
and it's the type provided by <linux/aio_abi.h>.
Use it in the SYNOPSIS.libaio uses '
io_context_t', but that difference is already noted in NOTES.Hey Alex,
I think your patch is correct. But I see that I changed these prototypes a few years back after reports from Jeff Moyer and Andi Kleen. The situation is confusing.
Could I ask you to rewrite this patch to add the following immediately after the DESCRIPTION heading in each page:
[[
Note: this page describes the raw Linux system call interface. the wrapper functions provided by _libaio_ use a differnt type for the _ctx_id_ argument. See NOTES.
]]
Quoted 6 lines
This will save me or someone else in the future perhaps reverting your fix!
Thanks,
Michael
Sure :)
Cheers,
Alex
man2/io_cancel.2 | 11 ++++++++++- man2/io_destroy.2 | 11 ++++++++++- man2/io_getevents.2 | 11 ++++++++++- man2/io_setup.2 | 11 ++++++++++- man2/io_submit.2 | 11 ++++++++++- 5 files changed, 50 insertions(+), 5 deletions(-)
man2/io_cancel.2 +10 -1
@@ -11,13 +11,22 @@ io_cancel \- cancel an outstanding asynchronous I/O operation .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_cancel(io_context_t " ctx_id ", struct iocb *" iocb , +.BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb , .BI " struct io_event *" result ); .fi .PP .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_id +argument. +See NOTES. +.PP The .BR io_cancel () system call
man2/io_destroy.2 +10 -1
@@ -11,12 +11,21 @@ io_destroy \- destroy an asynchronous I/O context .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_destroy(io_context_t " ctx_id ); +.BI "int io_destroy(aio_context_t " ctx_id ); .fi .PP .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_id +argument. +See NOTES. +.PP The .BR io_destroy () system call
man2/io_getevents.2 +10 -1
@@ -12,7 +12,7 @@ io_getevents \- read asynchronous I/O events from the completion queue .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .BR "#include <linux/time.h>" " /* Defines 'struct timespec' */" .PP -.BI "int io_getevents(io_context_t " ctx_id ", long " min_nr ", long " nr , +.BI "int io_getevents(aio_context_t " ctx_id ", long " min_nr ", long " nr , .BI " struct io_event *" events \ ", struct timespec *" timeout ); .fi
@@ -20,6 +20,15 @@ io_getevents \- read asynchronous I/O events from the completion queue .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_id +argument. +See NOTES. +.PP The .BR io_getevents () system call
man2/io_setup.2 +10 -1
@@ -11,12 +11,21 @@ io_setup \- create an asynchronous I/O context .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_setup(unsigned " nr_events ", io_context_t *" ctx_idp ); +.BI "int io_setup(unsigned " nr_events ", aio_context_t *" ctx_idp ); .fi .PP .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_idp +argument. +See NOTES. +.PP The .BR io_setup () system call
man2/io_submit.2 +10 -1
@@ -12,13 +12,22 @@ io_submit \- submit asynchronous I/O blocks for processing .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_submit(io_context_t " ctx_id ", long " nr \ +.BI "int io_submit(aio_context_t " ctx_id ", long " nr \ ", struct iocb **" iocbpp ); .fi .PP .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_id +argument. +See NOTES. +.PP The .BR io_submit () system call
Signature · 1 line
2.28.0
Re: [PATCH v2] io_cancel.2, io_destroy.2, io_getevents.2, io_setup.2, io_submit.2: SYNOPSIS: s/io_context_t/aio_context_t/
Hi Alex,
Quoted 7 lines · Alejandro Colomar
Linux uses
aio_context_tfor these syscalls,
and it's the type provided by <linux/aio_abi.h>.
Use it in the SYNOPSIS.libaio uses '
io_context_t', but that difference is already noted in NOTES.Signed-off-by Alejandro Colomar <[email protected]>
Thanks. Patch applied.
Cheers,
Michael
Quoted 187 lines
---
Quoted 22 lines · Michael Kerrisk (man-pages)
Quoted 5 lines · Alejandro Colomar
Linux uses
aio_context_tfor these syscalls,
and it's the type provided by <linux/aio_abi.h>.
Use it in the SYNOPSIS.libaio uses '
io_context_t', but that difference is already noted in NOTES.Hey Alex,
I think your patch is correct. But I see that I changed these prototypes a few years back after reports from Jeff Moyer and Andi Kleen. The situation is confusing.
Could I ask you to rewrite this patch to add the following immediately after the DESCRIPTION heading in each page:
[[
Note: this page describes the raw Linux system call interface. the wrapper functions provided by _libaio_ use a differnt type for the _ctx_id_ argument. See NOTES.
]]Quoted 6 lines
This will save me or someone else in the future perhaps reverting your fix!
Thanks,
Michael
Sure :)
Cheers,
Alex
man2/io_cancel.2 | 11 ++++++++++- man2/io_destroy.2 | 11 ++++++++++- man2/io_getevents.2 | 11 ++++++++++- man2/io_setup.2 | 11 ++++++++++- man2/io_submit.2 | 11 ++++++++++- 5 files changed, 50 insertions(+), 5 deletions(-)man2/io_cancel.2 +10
-1@@ -11,13 +11,22 @@ io_cancel \- cancel an outstanding asynchronous I/O operation .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_cancel(io_context_t " ctx_id ", struct iocb *" iocb , +.BI "int io_cancel(aio_context_t " ctx_id ", struct iocb *" iocb , .BI " struct io_event *" result ); .fi .PP .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_id +argument. +See NOTES. +.PP The .BR io_cancel () system callman2/io_destroy.2 +10
-1@@ -11,12 +11,21 @@ io_destroy \- destroy an asynchronous I/O context .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_destroy(io_context_t " ctx_id ); +.BI "int io_destroy(aio_context_t " ctx_id ); .fi .PP .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_id +argument. +See NOTES. +.PP The .BR io_destroy () system callman2/io_getevents.2 +10
-1@@ -12,7 +12,7 @@ io_getevents \- read asynchronous I/O events from the completion queue .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .BR "#include <linux/time.h>" " /* Defines 'struct timespec' */" .PP -.BI "int io_getevents(io_context_t " ctx_id ", long " min_nr ", long " nr , +.BI "int io_getevents(aio_context_t " ctx_id ", long " min_nr ", long " nr , .BI " struct io_event *" events \ ", struct timespec *" timeout ); .fi@@ -20,6 +20,15 @@ io_getevents \- read asynchronous I/O events from the completion queue .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_id +argument. +See NOTES. +.PP The .BR io_getevents () system callman2/io_setup.2 +10
-1@@ -11,12 +11,21 @@ io_setup \- create an asynchronous I/O context .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_setup(unsigned " nr_events ", io_context_t *" ctx_idp ); +.BI "int io_setup(unsigned " nr_events ", aio_context_t *" ctx_idp ); .fi .PP .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_idp +argument. +See NOTES. +.PP The .BR io_setup () system callman2/io_submit.2 +10
-1@@ -12,13 +12,22 @@ io_submit \- submit asynchronous I/O blocks for processing .nf .BR "#include <linux/aio_abi.h>" " /* Defines needed types */" .PP -.BI "int io_submit(io_context_t " ctx_id ", long " nr \ +.BI "int io_submit(aio_context_t " ctx_id ", long " nr \ ", struct iocb **" iocbpp ); .fi .PP .IR Note : There is no glibc wrapper for this system call; see NOTES. .SH DESCRIPTION +.IR Note : +this page describes the raw Linux system call interface. +The wrapper functions provided by +.I libaio +use a different type for the +.I ctx_id +argument. +See NOTES. +.PP The .BR io_submit () system call
Signature · 3 lines
Michael Kerrisk Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/ Linux/UNIX System Programming Training: http://man7.org/training/