*fio_debug_jobp = pid;
}
dprint(FD_MUTEX, "wait on startup_mutex\n");
- if (fio_mutex_down_timeout(startup_mutex, 10)) {
+ if (fio_mutex_down_timeout(startup_mutex, 10000)) {
log_err("fio: job startup hung? exiting.\n");
fio_terminate_threads(TERMINATE_ALL);
fio_abort = 1;
static void *helper_thread_main(void *data)
{
+ struct backend_data *d = data;
int ret = 0;
+ if (d)
+ pthread_setspecific(d->key, d->ptr);
+
fio_mutex_up(startup_mutex);
while (!ret) {
return NULL;
}
-static int create_helper_thread(void)
+static int create_helper_thread(struct backend_data *data)
{
int ret;
pthread_cond_init(&helper_cond, NULL);
pthread_mutex_init(&helper_lock, NULL);
- ret = pthread_create(&helper_thread, NULL, helper_thread_main, NULL);
+ ret = pthread_create(&helper_thread, NULL, helper_thread_main, data);
if (ret) {
log_err("Can't create helper thread: %s\n", strerror(ret));
return 1;
return 0;
}
-int fio_backend(void)
+int fio_backend(struct backend_data *data)
{
struct thread_data *td;
int i;
set_genesis_time();
stat_init();
- create_helper_thread();
+ create_helper_thread(data);
cgroup_list = smalloc(sizeof(*cgroup_list));
INIT_FLIST_HEAD(cgroup_list);