__usec_sleep() really just spins, rename it
authorJens Axboe <jens.axboe@oracle.com>
Wed, 10 Dec 2008 12:24:12 +0000 (13:24 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 10 Dec 2008 12:24:12 +0000 (13:24 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
engines/cpu.c
fio.c
fio.h
time.c

index c8eb6b30bf286e03c2a41d712d32e032eb51aa18..8bc9fd5c3c8c8919d4618bf6f149fb5b142093a6 100644 (file)
@@ -9,7 +9,7 @@
 
 static int fio_cpuio_queue(struct thread_data *td, struct io_u fio_unused *io_u)
 {
-       __usec_sleep(td->o.cpucycle);
+       usec_spin(td->o.cpucycle);
        return FIO_Q_COMPLETED;
 }
 
diff --git a/fio.c b/fio.c
index 3944ce7349d89d77d3cc2b28dcd6f94a57dbe7ff..a11f2bbb76e6989aa1ecf22094fdca2495dd7a1d 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -673,7 +673,7 @@ sync_done:
                                int left;
 
                                if (td->o.thinktime_spin)
-                                       __usec_sleep(td->o.thinktime_spin);
+                                       usec_spin(td->o.thinktime_spin);
 
                                left = td->o.thinktime - td->o.thinktime_spin;
                                if (left)
diff --git a/fio.h b/fio.h
index d21f5e4b389aada02f2fc95018907e647164cef2..e74836f7bc881720f7b7bef984c879ea5179c726 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -827,7 +827,7 @@ extern unsigned long mtime_since(struct timeval *, struct timeval *);
 extern unsigned long mtime_since_now(struct timeval *);
 extern unsigned long time_since_now(struct timeval *);
 extern unsigned long mtime_since_genesis(void);
-extern void __usec_sleep(unsigned int);
+extern void usec_spin(unsigned int);
 extern void usec_sleep(struct thread_data *, unsigned long);
 extern void rate_throttle(struct thread_data *, unsigned long, unsigned int);
 extern void fill_start_time(struct timeval *);
diff --git a/time.c b/time.c
index e84fb013ed0caec000f10e202ca8da3fc9a33963..643fcea8c04c4f481212443f0fd1e642562ef902 100644 (file)
--- a/time.c
+++ b/time.c
@@ -78,7 +78,7 @@ unsigned long time_since_now(struct timeval *s)
 /*
  * busy looping version for the last few usec
  */
-void __usec_sleep(unsigned int usec)
+void usec_spin(unsigned int usec)
 {
        struct timeval start;
 
@@ -96,7 +96,7 @@ void usec_sleep(struct thread_data *td, unsigned long usec)
                unsigned long ts = usec;
 
                if (usec < ns_granularity) {
-                       __usec_sleep(usec);
+                       usec_spin(usec);
                        break;
                }