__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 c8eb6b3..8bc9fd5 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 3944ce7..a11f2bb 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 d21f5e4..e74836f 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 e84fb01..643fcea 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;
                }