->getevents() should take unsigned args
authorJens Axboe <jens.axboe@oracle.com>
Tue, 11 Dec 2007 09:49:39 +0000 (10:49 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Tue, 11 Dec 2007 09:49:39 +0000 (10:49 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/guasi.c
engines/libaio.c
engines/null.c
engines/posixaio.c
engines/sg.c
engines/skeleton_external.c
engines/syslet-rw.c
fio.h
ioengines.c

index 69b2cd2a7f2435e692361cf2d437aff8ea9105eb..e0bcaf4c72bf89058d7e78533de9beafd847bb9f 100644 (file)
@@ -86,8 +86,8 @@ static struct io_u *fio_guasi_event(struct thread_data *td, int event)
        return io_u;
 }
 
        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;
 {
        struct guasi_data *ld = td->io_ops->data;
        int n, r;
index 8f677115056d2e922bda4eaa5f766423db07b6ec..29eac20fe80412f55b7783fd8586dc880fac054b 100644 (file)
@@ -60,8 +60,8 @@ static struct io_u *fio_libaio_event(struct thread_data *td, int event)
        return io_u;
 }
 
        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;
 {
        struct libaio_data *ld = td->io_ops->data;
        long r;
index bbb4e8ab9a89521516694e14dc9dd7ea00e7f584..85d6847e18388eee2822f7b7cf38b7d230b5ec27 100644 (file)
@@ -26,8 +26,9 @@ static struct io_u *fio_null_event(struct thread_data *td, int event)
        return nd->io_us[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;
 {
        struct null_data *nd = td->io_ops->data;
        int ret = 0;
index 9ff05c4914151387dae188d4c8798c7c3d0985c0..65a88e90756ceeb6b8640a99aff46d752abd0a80 100644 (file)
@@ -76,8 +76,8 @@ static int fio_posixaio_prep(struct thread_data fio_unused *td,
        return 0;
 }
 
        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;
 {
        struct posixaio_data *pd = td->io_ops->data;
        struct list_head *entry;
index 790019e1d57fa48e7a635cecdc47dd5b6835cba3..a9ff93a30280a5b95ceeb68bf04d83ce21bff4fe 100644 (file)
@@ -61,8 +61,8 @@ static int pollin_events(struct pollfd *pfds, int fds)
        return 0;
 }
 
        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;
 {
        struct sgio_data *sd = td->io_ops->data;
        int left = max, ret, r = 0;
index 26dbedf6b9b4ad9ef506aad138c185cf49f8ef81..dec258c265e216463902e2bd5458e8d05f1f3f9e 100644 (file)
@@ -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.
  */
  * 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;
 }
 {
        return 0;
 }
index e4ccb957194d29b9cd70b8624d51a8f591563a5e..8f2c415d56a4a8aa6d61d2d25e2a279d436b88a3 100644 (file)
@@ -99,8 +99,8 @@ static void fio_syslet_wait_for_events(struct thread_data *td)
        } while (1);
 }
 
        } 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;
                                struct timespec fio_unused *t)
 {
        struct syslet_data *sd = td->io_ops->data;
diff --git a/fio.h b/fio.h
index 7a0f56d3af6f5c7036a719db03b5bc61981c5bc4..1b43151d12a75ef410bc4547187a1dfac8b522a0 100644 (file)
--- 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_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 *);
 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 (*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 *);
        struct io_u *(*event)(struct thread_data *, int);
        int (*cancel)(struct thread_data *, struct io_u *);
        void (*cleanup)(struct thread_data *);
index d34d2f4303764566da297e327670d935e23de7ea..9aacc335d906b21b4b5c397c8d26049338bc1b42 100644 (file)
@@ -165,7 +165,7 @@ int td_io_prep(struct thread_data *td, struct io_u *io_u)
        return 0;
 }
 
        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) {
                    struct timespec *t)
 {
        if (min > 0 && td->io_ops->commit) {