From e7d2e61694c62b90a2fb84c012b4edcc1973d72c Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Tue, 11 Dec 2007 10:49:39 +0100 Subject: [PATCH] ->getevents() should take unsigned args Signed-off-by: Jens Axboe --- engines/guasi.c | 4 ++-- engines/libaio.c | 4 ++-- engines/null.c | 5 +++-- engines/posixaio.c | 4 ++-- engines/sg.c | 4 ++-- engines/skeleton_external.c | 4 ++-- engines/syslet-rw.c | 4 ++-- fio.h | 4 ++-- ioengines.c | 2 +- 9 files changed, 18 insertions(+), 17 deletions(-) diff --git a/engines/guasi.c b/engines/guasi.c index 69b2cd2a..e0bcaf4c 100644 --- a/engines/guasi.c +++ b/engines/guasi.c @@ -86,8 +86,8 @@ static struct io_u *fio_guasi_event(struct thread_data *td, int event) return io_u; } -static int fio_guasi_getevents(struct thread_data *td, int min, int max, - struct timespec *t) +static int fio_guasi_getevents(struct thread_data *td, unsigned int min, + unsigned int max, struct timespec *t) { struct guasi_data *ld = td->io_ops->data; int n, r; diff --git a/engines/libaio.c b/engines/libaio.c index 8f677115..29eac20f 100644 --- a/engines/libaio.c +++ b/engines/libaio.c @@ -60,8 +60,8 @@ static struct io_u *fio_libaio_event(struct thread_data *td, int event) return io_u; } -static int fio_libaio_getevents(struct thread_data *td, int min, int max, - struct timespec *t) +static int fio_libaio_getevents(struct thread_data *td, unsigned int min, + unsigned int max, struct timespec *t) { struct libaio_data *ld = td->io_ops->data; long r; diff --git a/engines/null.c b/engines/null.c index bbb4e8ab..85d6847e 100644 --- a/engines/null.c +++ b/engines/null.c @@ -26,8 +26,9 @@ static struct io_u *fio_null_event(struct thread_data *td, int event) return nd->io_us[event]; } -static int fio_null_getevents(struct thread_data *td, int min_events, - int fio_unused max, struct timespec fio_unused *t) +static int fio_null_getevents(struct thread_data *td, unsigned int min_events, + unsigned int fio_unused max, + struct timespec fio_unused *t) { struct null_data *nd = td->io_ops->data; int ret = 0; diff --git a/engines/posixaio.c b/engines/posixaio.c index 9ff05c49..65a88e90 100644 --- a/engines/posixaio.c +++ b/engines/posixaio.c @@ -76,8 +76,8 @@ static int fio_posixaio_prep(struct thread_data fio_unused *td, return 0; } -static int fio_posixaio_getevents(struct thread_data *td, int min, int max, - struct timespec *t) +static int fio_posixaio_getevents(struct thread_data *td, unsigned int min, + unsigned int max, struct timespec *t) { struct posixaio_data *pd = td->io_ops->data; struct list_head *entry; diff --git a/engines/sg.c b/engines/sg.c index 790019e1..a9ff93a3 100644 --- a/engines/sg.c +++ b/engines/sg.c @@ -61,8 +61,8 @@ static int pollin_events(struct pollfd *pfds, int fds) return 0; } -static int fio_sgio_getevents(struct thread_data *td, int min, int max, - struct timespec fio_unused *t) +static int fio_sgio_getevents(struct thread_data *td, unsigned int min, + unsigned int max, struct timespec fio_unused *t) { struct sgio_data *sd = td->io_ops->data; int left = max, ret, r = 0; diff --git a/engines/skeleton_external.c b/engines/skeleton_external.c index 26dbedf6..dec258c2 100644 --- a/engines/skeleton_external.c +++ b/engines/skeleton_external.c @@ -37,8 +37,8 @@ static struct io_u *fio_skeleton_event(struct thread_data *td, int event) * which may then be retrieved by calling the ->event() hook with the event * numbers. Required. */ -static int fio_skeleton_getevents(struct thread_data *td, int min, int max, - struct timespec *t) +static int fio_skeleton_getevents(struct thread_data *td, unsigned int min, + unsigned int max, struct timespec *t) { return 0; } diff --git a/engines/syslet-rw.c b/engines/syslet-rw.c index e4ccb957..8f2c415d 100644 --- a/engines/syslet-rw.c +++ b/engines/syslet-rw.c @@ -99,8 +99,8 @@ static void fio_syslet_wait_for_events(struct thread_data *td) } while (1); } -static int fio_syslet_getevents(struct thread_data *td, int min, - int fio_unused max, +static int fio_syslet_getevents(struct thread_data *td, unsigned int min, + unsigned int fio_unused max, struct timespec fio_unused *t) { struct syslet_data *sd = td->io_ops->data; diff --git a/fio.h b/fio.h index 7a0f56d3..1b43151d 100644 --- a/fio.h +++ b/fio.h @@ -883,7 +883,7 @@ extern int __must_check td_io_init(struct thread_data *); extern int __must_check td_io_prep(struct thread_data *, struct io_u *); extern int __must_check td_io_queue(struct thread_data *, struct io_u *); extern int __must_check td_io_sync(struct thread_data *, struct fio_file *); -extern int __must_check td_io_getevents(struct thread_data *, int, int, struct timespec *); +extern int __must_check td_io_getevents(struct thread_data *, unsigned int, unsigned int, struct timespec *); extern int __must_check td_io_commit(struct thread_data *); extern int __must_check td_io_open_file(struct thread_data *, struct fio_file *); extern void td_io_close_file(struct thread_data *, struct fio_file *); @@ -920,7 +920,7 @@ struct ioengine_ops { int (*prep)(struct thread_data *, struct io_u *); int (*queue)(struct thread_data *, struct io_u *); int (*commit)(struct thread_data *); - int (*getevents)(struct thread_data *, int, int, struct timespec *); + int (*getevents)(struct thread_data *, unsigned int, unsigned int, struct timespec *); struct io_u *(*event)(struct thread_data *, int); int (*cancel)(struct thread_data *, struct io_u *); void (*cleanup)(struct thread_data *); diff --git a/ioengines.c b/ioengines.c index d34d2f43..9aacc335 100644 --- a/ioengines.c +++ b/ioengines.c @@ -165,7 +165,7 @@ int td_io_prep(struct thread_data *td, struct io_u *io_u) return 0; } -int td_io_getevents(struct thread_data *td, int min, int max, +int td_io_getevents(struct thread_data *td, unsigned int min, unsigned int max, struct timespec *t) { if (min > 0 && td->io_ops->commit) { -- 2.25.1