projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make td_verror() use an unsigned type
[fio.git]
/
libfio.c
diff --git
a/libfio.c
b/libfio.c
index 8eddab80b345651f11533038963bb03e5bc0ff93..3fde492c91af727f6d96abf39c308d3ca4b657c7 100644
(file)
--- a/
libfio.c
+++ b/
libfio.c
@@
-31,6
+31,7
@@
#include "fio.h"
#include "smalloc.h"
#include "os/os.h"
#include "fio.h"
#include "smalloc.h"
#include "os/os.h"
+#include "filelock.h"
/*
* Just expose an empty list, if the OS does not support disk util stats
/*
* Just expose an empty list, if the OS does not support disk util stats
@@
-217,6
+218,21
@@
void fio_terminate_threads(int group_id)
}
}
}
}
+int fio_running_or_pending_io_threads(void)
+{
+ struct thread_data *td;
+ int i;
+
+ for_each_td(td, i) {
+ if (td->flags & TD_F_NOIO)
+ continue;
+ if (td->runstate < TD_EXITED)
+ return 1;
+ }
+
+ return 0;
+}
+
static int endian_check(void)
{
union {
static int endian_check(void)
{
union {
@@
-265,6
+281,11
@@
int initialize_fio(char *envp[])
sinit();
sinit();
+ if (fio_filelock_init()) {
+ log_err("fio: failed initializing filelock subsys\n");
+ return 1;
+ }
+
/*
* We need locale for number printing, if it isn't set then just
* go with the US format.
/*
* We need locale for number printing, if it isn't set then just
* go with the US format.