X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=libfio.c;h=8eddab80b345651f11533038963bb03e5bc0ff93;hp=7f36514725738b1f2cb56cc292a366c443137c76;hb=3d434057fd4c20c2b1216d9696c4fed9f7d8c4dd;hpb=3e260a46ea9a8de224c3d0a29a608da3440f284a diff --git a/libfio.c b/libfio.c index 7f365147..8eddab80 100644 --- a/libfio.c +++ b/libfio.c @@ -52,8 +52,10 @@ static const char *fio_os_strings[os_nr] = { "HP-UX", "OSX", "NetBSD", + "OpenBSD", "Solaris", - "Windows" + "Windows", + "Android", }; static const char *fio_arch_strings[arch_nr] = { @@ -83,7 +85,6 @@ static void reset_io_counters(struct thread_data *td) td->this_io_blocks[ddir] = 0; td->rate_bytes[ddir] = 0; td->rate_blocks[ddir] = 0; - td->io_issues[ddir] = 0; } td->zone_bytes = 0; @@ -134,7 +135,7 @@ void reset_all_stats(struct thread_data *td) memcpy(&td->epoch, &tv, sizeof(tv)); memcpy(&td->start, &tv, sizeof(tv)); - lat_target_init(td); + lat_target_reset(td); } void reset_fio_state(void) @@ -171,6 +172,19 @@ void td_set_runstate(struct thread_data *td, int runstate) td->runstate = runstate; } +int td_bump_runstate(struct thread_data *td, int new_state) +{ + int old_state = td->runstate; + + td_set_runstate(td, new_state); + return old_state; +} + +void td_restore_runstate(struct thread_data *td, int old_state) +{ + td_set_runstate(td, old_state); +} + void fio_terminate_threads(int group_id) { struct thread_data *td;