Lines Matching refs:id
58 int i, id, ret = -EINVAL; in handle_op() local
97 id = td->opdata; in handle_op()
98 if (id < 0 || id >= MAX_RT_TEST_MUTEXES) in handle_op()
101 td->mutexes[id] = 1; in handle_op()
103 rt_mutex_lock(&mutexes[id]); in handle_op()
105 td->mutexes[id] = 4; in handle_op()
110 id = td->opdata; in handle_op()
111 if (id < 0 || id >= MAX_RT_TEST_MUTEXES) in handle_op()
114 td->mutexes[id] = 1; in handle_op()
116 ret = rt_mutex_lock_interruptible(&mutexes[id], 0); in handle_op()
118 td->mutexes[id] = ret ? 0 : 4; in handle_op()
122 id = td->opdata; in handle_op()
123 if (id < 0 || id >= MAX_RT_TEST_MUTEXES || td->mutexes[id] != 4) in handle_op()
127 rt_mutex_unlock(&mutexes[id]); in handle_op()
129 td->mutexes[id] = 0; in handle_op()
309 tid = td->sysdev.id; in sysfs_test_command()
372 tsk = threads[td->sysdev.id]; in sysfs_test_status()
389 mutexes[td->sysdev.id].owner); in sysfs_test_status()
401 static int init_test_thread(int id) in init_test_thread() argument
403 thread_data[id].sysdev.cls = &rttest_sysclass; in init_test_thread()
404 thread_data[id].sysdev.id = id; in init_test_thread()
406 threads[id] = kthread_run(test_func, &thread_data[id], "rt-test-%d", id); in init_test_thread()
407 if (IS_ERR(threads[id])) in init_test_thread()
408 return PTR_ERR(threads[id]); in init_test_thread()
410 return sysdev_register(&thread_data[id].sysdev); in init_test_thread()