Home
last modified time | relevance | path

Searched refs:thr (Results 1 – 25 of 33) sorted by relevance

12

/illumos-gate/usr/src/cmd/mdb/common/modules/genunix/
H A Dfindstack_subr.c145 mdb_findstack_kthread_t thr; in stacks_findstack() local
157 if (mdb_ctf_vread(&thr, "kthread_t", "mdb_findstack_kthread_t", in stacks_findstack()
163 fsip->fsi_sobj_ops = (uintptr_t)thr.t_sobj_ops; in stacks_findstack()
164 fsip->fsi_tstate = thr.t_state; in stacks_findstack()
165 fsip->fsi_panic = !!(thr.t_flag & T_PANIC); in stacks_findstack()
167 if ((thr.t_schedflag & TS_LOAD) == 0) { in stacks_findstack()
174 if (thr.t_stk < thr.t_stkbase) { in stacks_findstack()
183 kbase = (uintptr_t)thr.t_stkbase; in stacks_findstack()
184 ktop = (uintptr_t)thr.t_stk; in stacks_findstack()
233 sp = KTOU((uintptr_t)thr.t_sp + STACK_BIAS); in stacks_findstack()
[all …]
H A Dsobj.c173 kthread_t thr; in wchan_walk_step() local
204 if (mdb_vread(&thr, sizeof (thr), t) != sizeof (thr)) { in wchan_walk_step()
209 if (thr.t_wchan == NULL) { in wchan_walk_step()
217 ww->ww_thr = (uintptr_t)thr.t_link; in wchan_walk_step()
224 if (ww->ww_compare == (uintptr_t)thr.t_wchan) in wchan_walk_step()
225 return (wsp->walk_callback(t, &thr, wsp->walk_cbdata)); in wchan_walk_step()
238 if (ww->ww_seen[i] == thr.t_wchan) in wchan_walk_step()
250 ww->ww_seen[ww->ww_seen_ndx++] = thr.t_wchan; in wchan_walk_step()
252 ww->ww_seen[ww->ww_seen_size - 1] = thr.t_wchan; in wchan_walk_step()
256 return (wsp->walk_callback((uintptr_t)thr.t_wchan, in wchan_walk_step()
/illumos-gate/usr/src/test/os-tests/tests/
H A Dclock_gettime.c195 thread_t thr; in clock_test_thread_clock() local
201 if (thr_create(NULL, 0, clock_test_cputime_thr, &arg, 0, &thr) != 0) { in clock_test_thread_clock()
206 if (thr_join(thr, NULL, NULL) != 0) { in clock_test_thread_clock()
220 thr, hrt, arg.cgta_usr); in clock_test_thread_clock()
233 "thread: %lld, main thread: %lld", thr, hrt, arg.cgta_usr); in clock_test_thread_clock()
284 struct timespec thr, proc; in clock_test_thread_proc() local
292 if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &thr) != 0) { in clock_test_thread_proc()
297 hrtthr = clock_ts2hrt(&thr); in clock_test_thread_proc()
315 thread_t thr; in main() local
323 if (thr_create(NULL, 0, clock_test_thr, NULL, 0, &thr) != 0) { in main()
[all …]
/illumos-gate/usr/src/uts/common/io/1394/targets/scsa1394/
H A Dsbp2_driver.c247 scsa1394_thread_t *thr; in scsa1394_sbp2_threads_init() local
252 thr = &lp->l_worker_thread; in scsa1394_sbp2_threads_init()
254 thr->thr_func = scsa1394_sbp2_worker_thread; in scsa1394_sbp2_threads_init()
255 thr->thr_arg = thr; in scsa1394_sbp2_threads_init()
256 thr->thr_state = SCSA1394_THR_INIT; in scsa1394_sbp2_threads_init()
257 cv_init(&thr->thr_cv, NULL, CV_DRIVER, NULL); in scsa1394_sbp2_threads_init()
258 thr->thr_lun = lp; in scsa1394_sbp2_threads_init()
259 thr->thr_req = 0; in scsa1394_sbp2_threads_init()
262 if (scsa1394_thr_dispatch(thr) != DDI_SUCCESS) { in scsa1394_sbp2_threads_init()
277 scsa1394_thread_t *thr; in scsa1394_sbp2_threads_fini() local
[all …]
H A Dhba.c2567 scsa1394_thr_dispatch(scsa1394_thread_t *thr) in scsa1394_thr_dispatch() argument
2569 scsa1394_lun_t *lp = thr->thr_lun; in scsa1394_thr_dispatch()
2574 ASSERT(thr->thr_state == SCSA1394_THR_INIT); in scsa1394_thr_dispatch()
2576 thr->thr_state = SCSA1394_THR_RUN; in scsa1394_thr_dispatch()
2578 ret = ddi_taskq_dispatch(sp->s_taskq, thr->thr_func, thr->thr_arg, in scsa1394_thr_dispatch()
2587 scsa1394_thr_cancel(scsa1394_thread_t *thr) in scsa1394_thr_cancel() argument
2589 scsa1394_lun_t *lp = thr->thr_lun; in scsa1394_thr_cancel()
2593 thr->thr_req |= SCSA1394_THREQ_EXIT; in scsa1394_thr_cancel()
2594 cv_signal(&thr->thr_cv); in scsa1394_thr_cancel()
2598 if (cv_wait_sig(&thr->thr_cv, &lp->l_mutex) == 0) { in scsa1394_thr_cancel()
[all …]
/illumos-gate/usr/src/test/libc-tests/tests/clocklock/
H A Dclock_lock.c122 clock_test_thr_t *thr = arg; in clock_test_thr() local
123 thr->cthr_ret = thr->cthr_test->ct_test(thr->cthr_test, in clock_test_thr()
124 thr->cthr_prim); in clock_test_thr()
143 pthread_t thr; in clock_test_one() local
151 if ((pret = pthread_create(&thr, NULL, clock_test_thr, in clock_test_one()
157 if ((pret = pthread_join(thr, NULL)) != 0) { in clock_test_one()
/illumos-gate/usr/src/test/nvme-tests/tests/ioctl/
H A Dlock-signal.c102 thread_t thr; in lock_signal_one() local
105 ret = thr_create(NULL, 0, lock_signal_thr, (void *)test, 0, &thr); in lock_signal_one()
112 while (!nvme_ioctl_test_thr_blocked(thr)) { in lock_signal_one()
120 ret = thr_kill(thr, SIGINFO); in lock_signal_one()
124 test->lss_desc, thr); in lock_signal_one()
127 ret = thr_join(thr, NULL, NULL); in lock_signal_one()
130 "because we failed to join thread %u", test->lss_desc, thr); in lock_signal_one()
H A Dnvme_ioctl_util.c204 nvme_ioctl_test_thr_blocked(thread_t thr) in nvme_ioctl_test_thr_blocked() argument
209 if (proc_get_lwpstatus(getpid(), (uint_t)thr, &lwp) != 0) { in nvme_ioctl_test_thr_blocked()
212 "for thread 0x%x", thr); in nvme_ioctl_test_thr_blocked()
/illumos-gate/usr/src/test/libc-tests/tests/threads/
H A Dpthread_attr_get_np.c165 pthread_t thr; in pgn_set_one() local
177 VERIFY0(pthread_create(&thr, &pgn_thr_attr, pgn_set_one_thr, NULL)); in pgn_set_one()
182 ret = pthread_join(thr, NULL); in pgn_set_one()
270 pthread_t thr; in pgn_set_two() local
283 VERIFY0(pthread_create(&thr, &pgn_thr_attr, pgn_set_two_thr, NULL)); in pgn_set_two()
304 pthread_t thr; in pgn_set_three() local
313 VERIFY0(pthread_create(&thr, NULL, pgn_set_three_thr, NULL)); in pgn_set_three()
315 VERIFY0(pthread_attr_get_np(thr, &altattr)); in pgn_set_three()
H A Dthread_name.c35 thr(void *unused) in thr() function
130 rc = pthread_create(&tid, NULL, thr, NULL); in main()
169 rc = pthread_create(&tid, &attr, thr, NULL); in main()
/illumos-gate/usr/src/test/libc-tests/tests/
H A Dmutex-16200.c191 mutex_test_thr_state(thread_t thr) in mutex_test_thr_state() argument
196 if (proc_get_lwpstatus(getpid(), (uint_t)thr, &lwp) != 0) { in mutex_test_thr_state()
226 thread_t thr; in mutex_test_run_one() local
230 err = thr_create(NULL, 0, mutex_test_thr, (void *)test, 0, &thr); in mutex_test_run_one()
239 while ((state = mutex_test_thr_state(thr)) == THR_STATE_RUNNING) { in mutex_test_run_one()
261 VERIFY0(thr_join(thr, NULL, &val)); in mutex_test_run_one()
/illumos-gate/usr/src/test/os-tests/tests/uccid/
H A Dexcl-nonblock.c60 thread_t thr; in main() local
86 &thr) != 0) { in main()
90 if (thr_join(thr, NULL, NULL) != 0) { in main()
/illumos-gate/usr/src/lib/libc/port/threads/
H A Dc11_thr.c194 thrd_create(thrd_t *thr, thrd_start_t func, void *arg) in thrd_create() argument
198 ret = pthread_create(thr, NULL, in thrd_create()
215 thrd_detach(thrd_t thr) in thrd_detach() argument
217 if (pthread_detach(thr) == 0) in thrd_detach()
/illumos-gate/usr/src/uts/common/io/usb/clients/usbser/
H A Dusbser.c1864 usbser_thr_dispatch(usbser_thread_t *thr) in usbser_thr_dispatch() argument
1866 usbser_port_t *pp = thr->thr_port; in usbser_thr_dispatch()
1871 ASSERT((thr->thr_flags & USBSER_THR_RUNNING) == 0); in usbser_thr_dispatch()
1873 thr->thr_flags = USBSER_THR_RUNNING; in usbser_thr_dispatch()
1875 rval = ddi_taskq_dispatch(usp->us_taskq, thr->thr_func, thr->thr_arg, in usbser_thr_dispatch()
1885 usbser_thr_cancel(usbser_thread_t *thr) in usbser_thr_cancel() argument
1887 usbser_port_t *pp = thr->thr_port; in usbser_thr_cancel()
1891 thr->thr_flags &= ~USBSER_THR_RUNNING; in usbser_thr_cancel()
1892 cv_signal(&thr->thr_cv); in usbser_thr_cancel()
1896 cv_wait(&thr->thr_cv, &pp->port_mutex); in usbser_thr_cancel()
[all …]
/illumos-gate/usr/src/lib/libproc/common/
H A Dproc_get_info.c224 proc_get_lwpsinfo(pid_t pid, uint_t thr, lwpsinfo_t *lwpip) in proc_get_lwpsinfo() argument
231 procfs_path, (int)pid, thr); in proc_get_lwpsinfo()
241 proc_get_lwpstatus(pid_t pid, uint_t thr, lwpstatus_t *lwp) in proc_get_lwpstatus() argument
248 procfs_path, (int)pid, thr); in proc_get_lwpstatus()
/illumos-gate/usr/src/cmd/isns/isnsd/
H A Ddoor.c1268 thr_elem_t *thr = thr_list; in match_entry() local
1270 while (thr) { in match_entry()
1271 if (pthread_equal(thr->thr_id, tid)) { in match_entry()
1272 return (thr); in match_entry()
1274 thr = thr->next; in match_entry()
1288 thr_elem_t *thr = thr_list; in add_entry() local
1300 while (thr->next) { in add_entry()
1301 thr = thr->next; in add_entry()
1303 thr->next = new_e; in add_entry()
1331 thr_elem_t *thr; in door_server() local
[all …]
/illumos-gate/usr/src/cmd/fm/fmd/common/
H A Dfmd_mdb.c69 fmd_thread_t thr; in trwalk_init() local
83 addr = (uintptr_t)thr.thr_list.l_next) { in trwalk_init()
89 if (mdb_vread(&thr, sizeof (thr), addr) != sizeof (thr)) { in trwalk_init()
100 sizeof (t->trw_data), (uintptr_t)thr.thr_trdata); in trwalk_init()
108 t->trw_tid = thr.thr_tid; in trwalk_init()
705 fmd_thread_t thr; in fmd_thread() local
713 if (mdb_vread(&thr, sizeof (thr), addr) != sizeof (thr)) { in fmd_thread()
724 addr, thr.thr_mod, thr.thr_tid, thr.thr_func); in fmd_thread()
/illumos-gate/usr/src/lib/libsip/common/
H A Dsip_timeout.c284 pthread_t thr; in sip_schedule_to_functions() local
286 (void) pthread_create(&thr, NULL, sip_run_to_functions, in sip_schedule_to_functions()
288 (void) pthread_detach(thr); in sip_schedule_to_functions()
/illumos-gate/usr/src/lib/libfakekernel/common/sys/
H A Dproc.h115 #define ISSIG(thr, why) issig(why) argument
/illumos-gate/usr/src/cmd/mdb/i86pc/modules/unix/
H A Dunix.c611 kthread_t thr; in mutex_owner_step() local
622 if (mdb_vread(&thr, sizeof (thr), owner) != -1) in mutex_owner_step()
623 (void) wsp->walk_callback(owner, &thr, wsp->walk_cbdata); in mutex_owner_step()
/illumos-gate/usr/src/cmd/varpd/
H A Dvarpd.c317 thread_t thr; in varpd_setup_lookup_threads() local
320 varpd_handle, THR_DETACHED | THR_DAEMON, &thr); in varpd_setup_lookup_threads()
/illumos-gate/usr/src/uts/common/io/ib/adapters/tavor/
H A Dtavor_stats.c671 kthread_t *thr; in tavor_kstat_perfcntr64_thread_create() local
680 thr = thread_create(NULL, 0, in tavor_kstat_perfcntr64_thread_create()
683 ksi->tki_perfcntr64_thread_id = thr->t_did; in tavor_kstat_perfcntr64_thread_create()
/illumos-gate/usr/src/uts/common/io/ib/adapters/hermon/
H A Dhermon_stats.c779 kthread_t *thr; in hermon_kstat_perfcntr64_thread_create() local
788 thr = thread_create(NULL, 0, in hermon_kstat_perfcntr64_thread_create()
791 ksi->hki_perfcntr64_thread_id = thr->t_did; in hermon_kstat_perfcntr64_thread_create()
/illumos-gate/usr/src/cmd/bhyve/common/
H A Dbhyverun.c410 pthread_t thr; in fbsdrun_addcpu() local
426 error = pthread_create(&thr, NULL, fbsdrun_start_thread, vi); in fbsdrun_addcpu()
/illumos-gate/usr/src/uts/sun4u/lw8/io/
H A Dsgenv.c1951 envresp_thresholds_t thr[SGENV_MAX_SENSORS_PER_KEY]; in sgenv_get_env_data() member
1972 resp.msg_len = sizeof (buf.thr); in sgenv_get_env_data()
1973 resp.msg_buf = (caddr_t)buf.thr; in sgenv_get_env_data()
2076 buf.thr[i].lo_warn; in sgenv_get_env_data()
2078 buf.thr[i].hi_warn; in sgenv_get_env_data()

12