Lines Matching defs:tp
48 thread_priv_t *tp = (thread_priv_t *)arg;
52 ASSERT(tp->tp_magic == TP_MAGIC);
53 func = tp->tp_func;
54 args = tp->tp_args;
55 set_current_state(tp->tp_state);
56 set_user_nice((kthread_t *)current, PRIO_TO_NICE(tp->tp_pri));
57 kmem_free(tp->tp_name, tp->tp_name_size);
58 kmem_free(tp, sizeof (thread_priv_t));
75 thread_priv_t *tp;
83 tp = kmem_alloc(sizeof (thread_priv_t), KM_PUSHPAGE);
84 if (tp == NULL)
87 tp->tp_magic = TP_MAGIC;
88 tp->tp_name_size = strlen(name) + 1;
90 tp->tp_name = kmem_alloc(tp->tp_name_size, KM_PUSHPAGE);
91 if (tp->tp_name == NULL) {
92 kmem_free(tp, sizeof (thread_priv_t));
96 strlcpy(tp->tp_name, name, tp->tp_name_size);
102 p = strstr(tp->tp_name, "_thread");
106 tp->tp_func = func;
107 tp->tp_args = args;
108 tp->tp_len = len;
109 tp->tp_state = state;
110 tp->tp_pri = pri;
112 tsk = spl_kthread_create(thread_generic_wrapper, (void *)tp,
113 "%s", tp->tp_name);