From 6dd6f2cd9fd0a59054c9d003c758d810fd5a8f4a Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 10 Dec 2008 13:24:12 +0100 Subject: [PATCH] __usec_sleep() really just spins, rename it Signed-off-by: Jens Axboe --- engines/cpu.c | 2 +- fio.c | 2 +- fio.h | 2 +- time.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/engines/cpu.c b/engines/cpu.c index c8eb6b30..8bc9fd5c 100644 --- a/engines/cpu.c +++ b/engines/cpu.c @@ -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 3944ce73..a11f2bbb 100644 --- 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 d21f5e4b..e74836f7 100644 --- 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 e84fb013..643fcea8 100644 --- 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; } -- 2.25.1