Lines Matching defs:ti
167 thread_info_free(thread_info_t *ti)
169 uu_list_node_fini(ti, &ti->ti_node, thread_pool);
170 if (ti->ti_ucred != NULL)
171 uu_free(ti->ti_ucred);
172 uu_free(ti);
178 thread_info_t *ti = arg;
180 if (ti != NULL)
181 log_enter(&ti->ti_log);
184 if (ti != NULL) {
186 uu_list_remove(thread_list, ti);
197 if (ti != NULL && ti != &main_thread_info)
198 thread_info_free(ti);
202 thread_newstate(thread_info_t *ti, thread_state_t newstate)
204 ti->ti_ucred_read = 0; /* invalidate cached ucred */
205 if (newstate != ti->ti_state) {
206 ti->ti_prev_state = ti->ti_state;
207 ti->ti_state = newstate;
208 ti->ti_lastchange = gethrtime();
225 thread_info_t *ti = thread_self();
226 ucred_t **ret = &ti->ti_ucred;
228 if (ti->ti_ucred_read)
233 ti->ti_ucred_read = 1;
265 thread_info_t *ti = thread_self();
267 return (ti->ti_active_client->rc_adt_session);
273 thread_info_t *ti = arg;
280 ti);
282 (void) pthread_setspecific(thread_info_key, ti);
284 thread_newstate(ti, TI_DOOR_RETURN);
296 thread_info_t *ti;
305 if ((ti = uu_zalloc(sizeof (*ti))) == NULL)
308 uu_list_node_init(ti, &ti->ti_node, thread_pool);
309 ti->ti_state = TI_CREATED;
310 ti->ti_prev_state = TI_CREATED;
312 if ((ti->ti_ucred = uu_zalloc(ucred_size())) == NULL)
317 if ((errno = pthread_create(&ti->ti_thread, &thread_attr, thread_start,
318 ti)) != 0) {
332 if (ti != NULL)
333 thread_info_free(ti);
546 thread_info_t *ti = &main_thread_info;
753 (void) memset(ti, '\0', sizeof (*ti));
754 uu_list_node_init(ti, &ti->ti_node, thread_pool);
756 ti);
758 ti->ti_thread = pthread_self();
759 ti->ti_state = TI_SIGNAL_WAIT;
760 ti->ti_prev_state = TI_SIGNAL_WAIT;
762 (void) pthread_setspecific(thread_info_key, ti);