#include <sys/thread.h>
#include <sys/random.h>
+#include <linux/delay.h>
+#include <linux/mm_compat.h>
+#include <linux/wait_compat.h>
+#include <linux/slab.h>
#include "splat-internal.h"
#define SPLAT_THREAD_NAME "thread"
unsigned long tp_magic;
struct file *tp_file;
spinlock_t tp_lock;
- wait_queue_head_t tp_waitq;
+ spl_wait_queue_head_t tp_waitq;
uint_t tp_keys[SPLAT_THREAD_TEST_KEYS];
int tp_rc;
int tp_count;
tp.tp_rc = 0;
thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work1, &tp, 0,
- &p0, TS_RUN, minclsyspri);
+ &p0, TS_RUN, defclsyspri);
/* Must never fail under Solaris, but we check anyway since this
* can happen in the linux SPL, we may want to change this behavior */
if (thr == NULL)
tp.tp_rc = 0;
thr = (kthread_t *)thread_create(NULL, 0, splat_thread_work2, &tp, 0,
- &p0, TS_RUN, minclsyspri);
+ &p0, TS_RUN, defclsyspri);
/* Must never fail under Solaris, but we check anyway since this
* can happen in the linux SPL, we may want to change this behavior */
if (thr == NULL)
/* Start tsd wait threads */
for (i = 0; i < SPLAT_THREAD_TEST_THREADS; i++) {
if (thread_create(NULL, 0, splat_thread_work3_wait,
- &tp, 0, &p0, TS_RUN, minclsyspri))
+ &tp, 0, &p0, TS_RUN, defclsyspri))
wait_count++;
}
/* Start tsd exit threads */
for (i = 0; i < SPLAT_THREAD_TEST_THREADS; i++) {
if (thread_create(NULL, 0, splat_thread_work3_exit,
- &tp, 0, &p0, TS_RUN, minclsyspri))
+ &tp, 0, &p0, TS_RUN, defclsyspri))
exit_count++;
}
spin_lock_init(&sub->test_lock);
sub->desc.id = SPLAT_SUBSYSTEM_THREAD;
- SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC,
+ splat_test_init(sub, SPLAT_THREAD_TEST1_NAME, SPLAT_THREAD_TEST1_DESC,
SPLAT_THREAD_TEST1_ID, splat_thread_test1);
- SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC,
+ splat_test_init(sub, SPLAT_THREAD_TEST2_NAME, SPLAT_THREAD_TEST2_DESC,
SPLAT_THREAD_TEST2_ID, splat_thread_test2);
- SPLAT_TEST_INIT(sub, SPLAT_THREAD_TEST3_NAME, SPLAT_THREAD_TEST3_DESC,
+ splat_test_init(sub, SPLAT_THREAD_TEST3_NAME, SPLAT_THREAD_TEST3_DESC,
SPLAT_THREAD_TEST3_ID, splat_thread_test3);
return sub;
splat_thread_fini(splat_subsystem_t *sub)
{
ASSERT(sub);
- SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST3_ID);
- SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST2_ID);
- SPLAT_TEST_FINI(sub, SPLAT_THREAD_TEST1_ID);
+ splat_test_fini(sub, SPLAT_THREAD_TEST3_ID);
+ splat_test_fini(sub, SPLAT_THREAD_TEST2_ID);
+ splat_test_fini(sub, SPLAT_THREAD_TEST1_ID);
kfree(sub);
}