[PATCH libaio v3 6/9] Wrap long declarations exceeding 80 columns
Guillem Jover <[email protected]> Wed, 17 Jun 2026 03:30:57 +0200
| Newsgroups | gmane.linux.kernel.aio.general |
|---|---|
| Message-ID | <[email protected]> |
From: Guillem Jover <[email protected]> Signed-off-by: Guillem Jover <[email protected]> --- src/io_cancel.c | 3 ++- src/io_getevents.c | 7 +++++-- src/io_pgetevents.c | 4 ++-- src/io_submit.c | 3 ++- src/libaio.h | 35 ++++++++++++++++++++++++----------- 5 files changed, 35 insertions(+), 17 deletions(-) diff --git a/src/io_cancel.c b/src/io_cancel.c index 441806d..8f69d71 100644 --- a/src/io_cancel.c +++ b/src/io_cancel.c @@ -19,5 +19,6 @@ #include <libaio.h> #include "syscall.h" -io_syscall3(int, io_cancel_0_4, io_cancel, io_context_t, ctx, struct iocb *, iocb, struct io_event *, event) +io_syscall3(int, io_cancel_0_4, io_cancel, io_context_t, ctx, + struct iocb *, iocb, struct io_event *, event) DEFSYMVER(io_cancel_0_4, io_cancel, 0.4); diff --git a/src/io_getevents.c b/src/io_getevents.c index 88d285a..f39d1af 100644 --- a/src/io_getevents.c +++ b/src/io_getevents.c @@ -23,9 +23,12 @@ #include "syscall.h" #include "aio_ring.h" -io_syscall5(int, __io_getevents_0_4, io_getevents, io_context_t, ctx, long, min_nr, long, nr, struct io_event *, events, struct timespec *, timeout) +io_syscall5(int, __io_getevents_0_4, io_getevents, io_context_t, ctx, + long, min_nr, long, nr, struct io_event *, events, + struct timespec *, timeout) -int io_getevents_0_4(io_context_t ctx, long min_nr, long nr, struct io_event * events, struct timespec * timeout) +int io_getevents_0_4(io_context_t ctx, long min_nr, long nr, + struct io_event * events, struct timespec * timeout) { if (aio_ring_is_empty(ctx, timeout)) return 0; diff --git a/src/io_pgetevents.c b/src/io_pgetevents.c index e6b0614..9d66dc8 100644 --- a/src/io_pgetevents.c +++ b/src/io_pgetevents.c @@ -25,8 +25,8 @@ #include "aio_ring.h" #ifdef __NR_io_pgetevents -io_syscall6(int, __io_pgetevents, io_pgetevents, io_context_t, ctx, long, - min_nr, long, nr, struct io_event *, events, +io_syscall6(int, __io_pgetevents, io_pgetevents, io_context_t, ctx, + long, min_nr, long, nr, struct io_event *, events, struct timespec *, timeout, void *, sigmask); int io_pgetevents(io_context_t ctx, long min_nr, long nr, diff --git a/src/io_submit.c b/src/io_submit.c index e22ba54..dd04361 100644 --- a/src/io_submit.c +++ b/src/io_submit.c @@ -20,4 +20,5 @@ #include <libaio.h> #include "syscall.h" -io_syscall3(int, io_submit, io_submit, io_context_t, ctx, long, nr, struct iocb **, iocbs) +io_syscall3(int, io_submit, io_submit, io_context_t, ctx, long, nr, + struct iocb **, iocbs) diff --git a/src/libaio.h b/src/libaio.h index 24b4b8a..f247c96 100644 --- a/src/libaio.h +++ b/src/libaio.h @@ -163,8 +163,10 @@ extern int io_queue_run(io_context_t ctx); extern int io_setup(int maxevents, io_context_t *ctxp); extern int io_destroy(io_context_t ctx); extern int io_submit(io_context_t ctx, long nr, struct iocb *ios[]); -extern int io_cancel(io_context_t ctx, struct iocb *iocb, struct io_event *evt); -extern int io_getevents(io_context_t ctx, long min_nr, long nr, struct io_event *events, struct timespec *timeout); +extern int io_cancel(io_context_t ctx, struct iocb *iocb, + struct io_event *evt); +extern int io_getevents(io_context_t ctx, long min_nr, long nr, + struct io_event *events, struct timespec *timeout); extern int io_pgetevents(io_context_t ctx, long min_nr, long nr, struct io_event *events, struct timespec *timeout, sigset_t *sigmask); @@ -175,7 +177,8 @@ static inline void io_set_callback(struct iocb *iocb, io_callback_t cb) iocb->data = (void *)cb; } -static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) +static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, + size_t count, long long offset) { memset(iocb, 0, sizeof(*iocb)); iocb->aio_fildes = fd; @@ -186,7 +189,8 @@ static inline void io_prep_pread(struct iocb *iocb, int fd, void *buf, size_t co iocb->u.c.offset = offset; } -static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t count, long long offset) +static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, + size_t count, long long offset) { memset(iocb, 0, sizeof(*iocb)); iocb->aio_fildes = fd; @@ -197,7 +201,8 @@ static inline void io_prep_pwrite(struct iocb *iocb, int fd, void *buf, size_t c iocb->u.c.offset = offset; } -static inline void io_prep_preadv(struct iocb *iocb, int fd, const struct iovec *iov, int iovcnt, long long offset) +static inline void io_prep_preadv(struct iocb *iocb, int fd, + const struct iovec *iov, int iovcnt, long long offset) { memset(iocb, 0, sizeof(*iocb)); iocb->aio_fildes = fd; @@ -208,7 +213,8 @@ static inline void io_prep_preadv(struct iocb *iocb, int fd, const struct iovec iocb->u.c.offset = offset; } -static inline void io_prep_pwritev(struct iocb *iocb, int fd, const struct iovec *iov, int iovcnt, long long offset) +static inline void io_prep_pwritev(struct iocb *iocb, int fd, + const struct iovec *iov, int iovcnt, long long offset) { memset(iocb, 0, sizeof(*iocb)); iocb->aio_fildes = fd; @@ -219,7 +225,9 @@ static inline void io_prep_pwritev(struct iocb *iocb, int fd, const struct iovec iocb->u.c.offset = offset; } -static inline void io_prep_preadv2(struct iocb *iocb, int fd, const struct iovec *iov, int iovcnt, long long offset, int flags) +static inline void io_prep_preadv2(struct iocb *iocb, int fd, + const struct iovec *iov, int iovcnt, long long offset, + int flags) { memset(iocb, 0, sizeof(*iocb)); iocb->aio_fildes = fd; @@ -231,7 +239,9 @@ static inline void io_prep_preadv2(struct iocb *iocb, int fd, const struct iovec iocb->u.c.offset = offset; } -static inline void io_prep_pwritev2(struct iocb *iocb, int fd, const struct iovec *iov, int iovcnt, long long offset, int flags) +static inline void io_prep_pwritev2(struct iocb *iocb, int fd, + const struct iovec *iov, int iovcnt, long long offset, + int flags) { memset(iocb, 0, sizeof(*iocb)); iocb->aio_fildes = fd; @@ -252,7 +262,8 @@ static inline void io_prep_poll(struct iocb *iocb, int fd, int events) iocb->u.poll.events = events; } -static inline int io_poll(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd, int events) +static inline int io_poll(io_context_t ctx, struct iocb *iocb, + io_callback_t cb, int fd, int events) { io_prep_poll(iocb, fd, events); io_set_callback(iocb, cb); @@ -267,7 +278,8 @@ static inline void io_prep_fsync(struct iocb *iocb, int fd) iocb->aio_reqprio = 0; } -static inline int io_fsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) +static inline int io_fsync(io_context_t ctx, struct iocb *iocb, + io_callback_t cb, int fd) { io_prep_fsync(iocb, fd); io_set_callback(iocb, cb); @@ -282,7 +294,8 @@ static inline void io_prep_fdsync(struct iocb *iocb, int fd) iocb->aio_reqprio = 0; } -static inline int io_fdsync(io_context_t ctx, struct iocb *iocb, io_callback_t cb, int fd) +static inline int io_fdsync(io_context_t ctx, struct iocb *iocb, + io_callback_t cb, int fd) { io_prep_fdsync(iocb, fd); io_set_callback(iocb, cb); -- 2.53.0 -- To unsubscribe, send a message with 'unsubscribe linux-aio' in the body to [email protected]. For more info on Linux AIO, see: http://www.kvack.org/aio/ Don't email: <a href=mailto:"[email protected]">[email protected]</a>