X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=libfio.c;h=8eddab80b345651f11533038963bb03e5bc0ff93;hp=f4aac2efb739c6910ca37cb046e6f2ad053c00d2;hb=8edd973d57a311d4c590d7385796bbdf111ed04c;hpb=ada083cdf71779d7969318e12e91ad18f5864485 diff --git a/libfio.c b/libfio.c index f4aac2ef..8eddab80 100644 --- a/libfio.c +++ b/libfio.c @@ -172,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;