projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rename TD_F_VER_NONE into TD_F_DO_VERIFY
[fio.git]
/
stat.c
diff --git
a/stat.c
b/stat.c
index 8a242c97430bd0bff2502013af5fd848a2a57881..a837ed90252eff2af69beb88e03f1c2c1ba6d72b 100644
(file)
--- a/
stat.c
+++ b/
stat.c
@@
-1,10
+1,7
@@
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
-#include <sys/types.h>
#include <sys/stat.h>
#include <sys/stat.h>
-#include <dirent.h>
-#include <libgen.h>
#include <math.h>
#include "fio.h"
#include <math.h>
#include "fio.h"
@@
-20,7
+17,7
@@
#define LOG_MSEC_SLACK 1
#define LOG_MSEC_SLACK 1
-struct fio_
mutex *stat_mutex
;
+struct fio_
sem *stat_sem
;
void clear_rusage_stat(struct thread_data *td)
{
void clear_rusage_stat(struct thread_data *td)
{
@@
-1946,9
+1943,9
@@
void __show_run_stats(void)
void show_run_stats(void)
{
void show_run_stats(void)
{
- fio_
mutex_down(stat_mutex
);
+ fio_
sem_down(stat_sem
);
__show_run_stats();
__show_run_stats();
- fio_
mutex_up(stat_mutex
);
+ fio_
sem_up(stat_sem
);
}
void __show_running_run_stats(void)
}
void __show_running_run_stats(void)
@@
-1958,7
+1955,7
@@
void __show_running_run_stats(void)
struct timespec ts;
int i;
struct timespec ts;
int i;
- fio_
mutex_down(stat_mutex
);
+ fio_
sem_down(stat_sem
);
rt = malloc(thread_number * sizeof(unsigned long long));
fio_gettime(&ts, NULL);
rt = malloc(thread_number * sizeof(unsigned long long));
fio_gettime(&ts, NULL);
@@
-1984,7
+1981,7
@@
void __show_running_run_stats(void)
continue;
if (td->rusage_sem) {
td->update_rusage = 1;
continue;
if (td->rusage_sem) {
td->update_rusage = 1;
- fio_
mutex
_down(td->rusage_sem);
+ fio_
sem
_down(td->rusage_sem);
}
td->update_rusage = 0;
}
}
td->update_rusage = 0;
}
@@
-2001,7
+1998,7
@@
void __show_running_run_stats(void)
}
free(rt);
}
free(rt);
- fio_
mutex_up(stat_mutex
);
+ fio_
sem_up(stat_sem
);
}
static bool status_interval_init;
}
static bool status_interval_init;
@@
-2690,7
+2687,7
@@
int calc_log_samples(void)
void stat_init(void)
{
void stat_init(void)
{
- stat_
mutex = fio_mutex_init(FIO_MUTEX
_UNLOCKED);
+ stat_
sem = fio_sem_init(FIO_SEM
_UNLOCKED);
}
void stat_exit(void)
}
void stat_exit(void)
@@
-2699,8
+2696,8
@@
void stat_exit(void)
* When we have the mutex, we know out-of-band access to it
* have ended.
*/
* When we have the mutex, we know out-of-band access to it
* have ended.
*/
- fio_
mutex_down(stat_mutex
);
- fio_
mutex_remove(stat_mutex
);
+ fio_
sem_down(stat_sem
);
+ fio_
sem_remove(stat_sem
);
}
/*
}
/*