9 #include <linux/device.h>
11 #include <linux/export.h>
12 #include <linux/sched.h>
19 #define MAX_RT_TEST_THREADS 8
20 #define MAX_RT_TEST_MUTEXES 8
111 return ret ? -
EINTR : 0;
148 BUG_ON(tid == MAX_RT_TEST_THREADS);
215 ret = handle_op(td, 1);
231 static int test_func(
void *
data)
246 ret = handle_op(td, 0);
286 if (count >=
sizeof(cmdbuf))
290 if (buf[count-1] ==
'\n')
295 memcpy(cmdbuf, buf, count);
298 if (
sscanf(cmdbuf,
"%d:%d", &op, &dat) != 2)
303 schedpar.sched_priority = 0;
311 schedpar.sched_priority =
dat;
346 tsk = threads[td->
dev.id];
348 spin_lock(&rttest_lock);
351 "O: %4d, E:%8d, S: 0x%08lx, P: %4d, N: %4d, B: %p, M:",
360 spin_unlock(&rttest_lock);
362 curr +=
sprintf(curr,
", T: %p, R: %p\n", tsk,
363 mutexes[td->
dev.id].owner);
371 static struct bus_type rttest_subsys = {
373 .dev_name =
"rttest",
376 static int init_test_thread(
int id)
382 if (IS_ERR(threads[
id]))
383 return PTR_ERR(threads[
id]);
388 static int init_rttest(
void)
402 ret = init_test_thread(i);
413 printk(
"Initializing RT-Tester: %s\n", ret ?
"Failed" :
"OK" );