Symbol: thr
crypto/heimdal/appl/gssmask/gssmaestro.c
54
pthread_t thr;
crypto/heimdal/appl/gssmask/gssmaestro.c
681
pthread_create(&c->thr, NULL, log_function, c);
crypto/heimdal/appl/gssmask/gssmaestro.c
953
pthread_join(&clients[i]->thr, NULL);
crypto/openssl/apps/speed.c
189
static HANDLE thr;
crypto/openssl/apps/speed.c
193
thr = CreateThread(NULL, 4096, sleepy, NULL, 0, NULL);
crypto/openssl/apps/speed.c
194
if (thr == NULL) {
crypto/openssl/apps/speed.c
205
TerminateThread(thr, 0);
crypto/openssl/apps/speed.c
206
CloseHandle(thr);
lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c
43
static pthread_t thr;
lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c
62
rc = pthread_create(&thr, NULL, mod_thread, NULL);
lib/libc/tests/stdlib/dynthr_mod/dynthr_mod.c
67
pthread_join(thr, NULL);
lib/libc/tests/stdlib/libc_exit_test.c
131
pthread_t thr;
lib/libc/tests/stdlib/libc_exit_test.c
136
pthread_create(&thr, NULL, mythreadexit, NULL);
lib/libc/tests/stdlib/system_test.c
111
pthread_t thr[N];
lib/libc/tests/stdlib/system_test.c
138
pthread_create(&thr[i], NULL, system_thread, arg));
lib/libc/tests/stdlib/system_test.c
165
ATF_CHECK_INTEQ(0, pthread_join(thr[i], &ret));
lib/libstdthreads/thrd.c
103
thrd_join(thrd_t thr, int *res)
lib/libstdthreads/thrd.c
107
if (pthread_join(thr, &value_ptr) != 0)
lib/libstdthreads/thrd.c
52
thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
lib/libstdthreads/thrd.c
65
if (pthread_create(thr, NULL, thrd_entry, tp) != 0) {
lib/libstdthreads/thrd.c
80
thrd_detach(thrd_t thr)
lib/libstdthreads/thrd.c
83
if (pthread_detach(thr) != 0)
lib/libthr/arch/amd64/include/pthread_md.h
48
struct pthread *thr;
lib/libthr/arch/amd64/include/pthread_md.h
50
__asm __volatile("movq %%fs:%c1, %0" : "=r" (thr)
lib/libthr/arch/amd64/include/pthread_md.h
52
return (thr);
lib/libthr/arch/i386/include/pthread_md.h
48
struct pthread *thr;
lib/libthr/arch/i386/include/pthread_md.h
50
__asm __volatile("movl %%gs:%c1, %0" : "=r" (thr)
lib/libthr/arch/i386/include/pthread_md.h
52
return (thr);
lib/libthr/tests/pthread_sigqueue_test.c
107
error = pthread_sigqueue(thr[i], SIGUSR1, sv);
lib/libthr/tests/pthread_sigqueue_test.c
109
error = pthread_join(thr[i], NULL);
lib/libthr/tests/pthread_sigqueue_test.c
42
static pthread_t thr[NTHREADS];
lib/libthr/tests/pthread_sigqueue_test.c
57
if (pthread_equal(self, thr[i])) {
lib/libthr/tests/pthread_sigqueue_test.c
99
error = pthread_create(&thr[i], NULL, threadfunc, NULL);
lib/libthr/tests/pthread_tryjoin_test.c
39
pthread_t thr;
lib/libthr/tests/pthread_tryjoin_test.c
43
error = pthread_create(&thr, NULL, thr_fun, &x);
lib/libthr/tests/pthread_tryjoin_test.c
46
error = pthread_tryjoin_np(thr, &retval);
lib/libthr/tests/pthread_tryjoin_test.c
53
error = pthread_tryjoin_np(thr, &retval);
lib/libthr/thread/thr_private.h
421
#define SHOULD_CANCEL(thr) \
lib/libthr/thread/thr_private.h
422
((thr)->cancel_pending && (thr)->cancel_enable && \
lib/libthr/thread/thr_private.h
423
(thr)->no_cancel == 0)
lib/libthr/thread/thr_private.h
645
#define THR_THREAD_LOCK(curthrd, thr) THR_LOCK_ACQUIRE(curthrd, &(thr)->lock)
lib/libthr/thread/thr_private.h
646
#define THR_THREAD_UNLOCK(curthrd, thr) THR_LOCK_RELEASE(curthrd, &(thr)->lock)
lib/libthread_db/libpthread_db.c
1090
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.c
111
ta->map[first].thr = pt;
lib/libthread_db/libpthread_db.c
271
while (pt != 0 && ta->map[id].thr != pt) {
lib/libthread_db/libpthread_db.c
462
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.c
467
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.c
487
ptr = ta->map[th->th_tid].thr + ta->thread_off_kse;
lib/libthread_db/libpthread_db.c
496
ptr = ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.c
602
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.c
607
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_tcb,
lib/libthread_db/libpthread_db.c
611
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_state,
lib/libthread_db/libpthread_db.c
641
ta->map[th->th_tid].thr + ta->thread_off_sigmask,
lib/libthread_db/libpthread_db.c
646
ta->map[th->th_tid].thr + ta->thread_off_sigpend,
lib/libthread_db/libpthread_db.c
696
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_tcb,
lib/libthread_db/libpthread_db.c
738
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_tcb,
lib/libthread_db/libpthread_db.c
780
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr + ta->thread_off_tcb,
lib/libthread_db/libpthread_db.c
823
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.c
85
} else if (ta->map[i].type == type && ta->map[i].thr == pt) {
lib/libthread_db/libpthread_db.c
871
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.c
918
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.c
996
ret = ps_pread(ta->ph, ta->map[th->th_tid].thr +
lib/libthread_db/libpthread_db.h
47
psaddr_t thr;
sys/amd64/amd64/db_trace.c
360
db_trace_thread(struct thread *thr, int count)
sys/amd64/amd64/db_trace.c
365
ctx = kdb_thr_ctx(thr);
sys/amd64/amd64/db_trace.c
366
tf = thr == kdb_thread ? kdb_frame : NULL;
sys/amd64/amd64/db_trace.c
367
return (db_backtrace(thr, tf, ctx->pcb_rbp, ctx->pcb_rip, ctx->pcb_rsp,
sys/amd64/pt/pt.c
427
struct hwt_thread *thr;
sys/amd64/pt/pt.c
473
TAILQ_FOREACH(thr, &ctx->threads, next) {
sys/amd64/pt/pt.c
474
if (thr->thread_id != thread_id)
sys/amd64/pt/pt.c
476
KASSERT(thr->private != NULL,
sys/amd64/pt/pt.c
479
__func__, thr));
sys/amd64/pt/pt.c
480
pt_ctx = (struct pt_ctx *)thr->private;
sys/amd64/pt/pt.c
635
struct hwt_thread *thr;
sys/amd64/pt/pt.c
642
TAILQ_FOREACH(thr, &ctx->threads, next) {
sys/amd64/pt/pt.c
643
KASSERT(thr->private != NULL,
sys/amd64/pt/pt.c
645
pt_ctx = (struct pt_ctx *)thr->private;
sys/amd64/pt/pt.c
676
buf = &((struct pt_ctx *)vm->thr->private)->buf;
sys/amd64/pt/pt.c
691
pt_backend_alloc_thread(struct hwt_thread *thr)
sys/amd64/pt/pt.c
701
error = pt_init_ctx(pt_ctx, thr->vm, thr->thread_id);
sys/amd64/pt/pt.c
705
thr->private = pt_ctx;
sys/amd64/pt/pt.c
712
pt_backend_free_thread(struct hwt_thread *thr)
sys/amd64/pt/pt.c
716
ctx = (struct pt_ctx *)thr->private;
sys/arm/arm/db_trace.c
136
db_trace_thread(struct thread *thr, int count)
sys/arm/arm/db_trace.c
141
if (thr != curthread) {
sys/arm/arm/db_trace.c
142
ctx = kdb_thr_ctx(thr);
sys/arm64/arm64/db_trace.c
145
db_trace_thread(struct thread *thr, int count)
sys/arm64/arm64/db_trace.c
150
if (thr != curthread) {
sys/arm64/arm64/db_trace.c
151
ctx = kdb_thr_ctx(thr);
sys/arm64/arm64/db_trace.c
155
db_stack_trace_cmd(thr, &frame);
sys/arm64/spe/arm_spe_backend.c
225
struct hwt_thread *thr;
sys/arm64/spe/arm_spe_backend.c
236
TAILQ_FOREACH(thr, &ctx->threads, next) {
sys/arm64/spe/arm_spe_backend.c
237
info = (struct arm_spe_info *)thr->private;
sys/arm64/spe/arm_spe_backend.c
238
printf("TID %u:\n", thr->thread_id);
sys/arm64/spe/arm_spe_backend.c
301
struct hwt_thread *thr = NULL;
sys/arm64/spe/arm_spe_backend.c
307
TAILQ_FOREACH(thr, &ctx->threads, next) {
sys/arm64/spe/arm_spe_backend.c
308
if (thr->thread_id != thread_id)
sys/arm64/spe/arm_spe_backend.c
310
info = (struct arm_spe_info *)thr->private;
sys/arm64/spe/arm_spe_backend.c
348
info->kvaddr = thr->vm->kvaddr;
sys/arm64/spe/arm_spe_backend.c
589
struct hwt_thread *thr;
sys/arm64/spe/arm_spe_backend.c
596
TAILQ_FOREACH(thr, &ctx->threads, next) {
sys/arm64/spe/arm_spe_backend.c
597
info = (struct arm_spe_info *)thr->private;
sys/arm64/spe/arm_spe_backend.c
640
struct hwt_thread *thr;
sys/arm64/spe/arm_spe_backend.c
660
TAILQ_FOREACH(thr, &ctx->threads, next) {
sys/arm64/spe/arm_spe_backend.c
661
if (thr->thread_id != s->ident)
sys/arm64/spe/arm_spe_backend.c
663
info = (struct arm_spe_info *)thr->private;
sys/arm64/spe/arm_spe_backend.c
735
spe_backend_thread_alloc(struct hwt_thread *thr)
sys/arm64/spe/arm_spe_backend.c
748
snprintf(lock_name, sizeof(lock_name), "Arm SPE lock/thr/%d", thr->thread_id);
sys/arm64/spe/arm_spe_backend.c
751
thr->private = info;
sys/arm64/spe/arm_spe_backend.c
757
spe_backend_thread_free(struct hwt_thread *thr)
sys/arm64/spe/arm_spe_backend.c
761
info = (struct arm_spe_info *)thr->private;
sys/cam/ctl/ctl.c
14302
struct ctl_thread *thr = (struct ctl_thread *)arg;
sys/cam/ctl/ctl.c
14303
struct ctl_softc *softc = thr->ctl_softc;
sys/cam/ctl/ctl.c
14323
mtx_lock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14324
io = (union ctl_io *)STAILQ_FIRST(&thr->isc_queue);
sys/cam/ctl/ctl.c
14326
STAILQ_REMOVE_HEAD(&thr->isc_queue, links);
sys/cam/ctl/ctl.c
14327
mtx_unlock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14331
io = (union ctl_io *)STAILQ_FIRST(&thr->done_queue);
sys/cam/ctl/ctl.c
14333
STAILQ_REMOVE_HEAD(&thr->done_queue, links);
sys/cam/ctl/ctl.c
14335
mtx_unlock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14339
io = (union ctl_io *)STAILQ_FIRST(&thr->incoming_queue);
sys/cam/ctl/ctl.c
14341
STAILQ_REMOVE_HEAD(&thr->incoming_queue, links);
sys/cam/ctl/ctl.c
14342
mtx_unlock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14359
io = (union ctl_io *)STAILQ_FIRST(&thr->rtr_queue);
sys/cam/ctl/ctl.c
14361
STAILQ_REMOVE_HEAD(&thr->rtr_queue, links);
sys/cam/ctl/ctl.c
14362
mtx_unlock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14382
mtx_sleep(thr, &thr->queue_lock, PDROP, "-", 0);
sys/cam/ctl/ctl.c
14384
thr->thread = NULL;
sys/cam/ctl/ctl.c
14499
struct ctl_thread *thr;
sys/cam/ctl/ctl.c
14504
thr = &softc->threads[idx];
sys/cam/ctl/ctl.c
14505
mtx_lock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14506
STAILQ_INSERT_TAIL(&thr->incoming_queue, &io->io_hdr, links);
sys/cam/ctl/ctl.c
14507
mtx_unlock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14508
wakeup(thr);
sys/cam/ctl/ctl.c
14515
struct ctl_thread *thr;
sys/cam/ctl/ctl.c
14517
thr = &softc->threads[io->io_hdr.nexus.targ_mapped_lun % worker_threads];
sys/cam/ctl/ctl.c
14518
mtx_lock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14519
STAILQ_INSERT_TAIL(&thr->rtr_queue, &io->io_hdr, links);
sys/cam/ctl/ctl.c
14520
mtx_unlock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14521
wakeup(thr);
sys/cam/ctl/ctl.c
14528
struct ctl_thread *thr;
sys/cam/ctl/ctl.c
14530
thr = &softc->threads[io->io_hdr.nexus.targ_mapped_lun % worker_threads];
sys/cam/ctl/ctl.c
14531
mtx_lock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14532
STAILQ_INSERT_TAIL(&thr->done_queue, &io->io_hdr, links);
sys/cam/ctl/ctl.c
14533
mtx_unlock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14534
wakeup(thr);
sys/cam/ctl/ctl.c
14541
struct ctl_thread *thr;
sys/cam/ctl/ctl.c
14543
thr = &softc->threads[io->io_hdr.nexus.targ_mapped_lun % worker_threads];
sys/cam/ctl/ctl.c
14544
mtx_lock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14545
STAILQ_INSERT_TAIL(&thr->isc_queue, &io->io_hdr, links);
sys/cam/ctl/ctl.c
14546
mtx_unlock(&thr->queue_lock);
sys/cam/ctl/ctl.c
14547
wakeup(thr);
sys/cam/ctl/ctl.c
2004
struct ctl_thread *thr = &softc->threads[i];
sys/cam/ctl/ctl.c
2006
mtx_init(&thr->queue_lock, "CTL queue mutex", NULL, MTX_DEF);
sys/cam/ctl/ctl.c
2007
thr->ctl_softc = softc;
sys/cam/ctl/ctl.c
2008
STAILQ_INIT(&thr->incoming_queue);
sys/cam/ctl/ctl.c
2009
STAILQ_INIT(&thr->rtr_queue);
sys/cam/ctl/ctl.c
2010
STAILQ_INIT(&thr->done_queue);
sys/cam/ctl/ctl.c
2011
STAILQ_INIT(&thr->isc_queue);
sys/cam/ctl/ctl.c
2013
error = kproc_kthread_add(ctl_work_thread, thr,
sys/cam/ctl/ctl.c
2014
&softc->ctl_proc, &thr->thread, 0, 0, "ctl", "work%d", i);
sys/cam/ctl/ctl.c
2053
struct ctl_thread *thr = &softc->threads[i];
sys/cam/ctl/ctl.c
2054
while (thr->thread != NULL) {
sys/cam/ctl/ctl.c
2055
wakeup(thr);
sys/cam/ctl/ctl.c
2056
if (thr->thread != NULL)
sys/cam/ctl/ctl.c
2059
mtx_destroy(&thr->queue_lock);
sys/compat/linux/linux_elf.c
108
struct thread *thr;
sys/compat/linux/linux_elf.c
120
thr = td;
sys/compat/linux/linux_elf.c
121
while (thr != NULL) {
sys/compat/linux/linux_elf.c
123
NT_PRSTATUS, __linuxN(note_prstatus), thr);
sys/compat/linux/linux_elf.c
129
NT_FPREGSET, __linuxN(note_fpregset), thr);
sys/compat/linux/linux_elf.c
131
-1, __linuxN(note_threadmd), thr);
sys/compat/linux/linux_elf.c
133
thr = thr == td ? TAILQ_FIRST(&p->p_threads) :
sys/compat/linux/linux_elf.c
134
TAILQ_NEXT(thr, td_plist);
sys/compat/linux/linux_elf.c
135
if (thr == td)
sys/compat/linux/linux_elf.c
136
thr = TAILQ_NEXT(thr, td_plist);
sys/ddb/db_thread.c
54
struct thread *thr;
sys/ddb/db_thread.c
58
thr = db_lookup_thread(tid, false);
sys/ddb/db_thread.c
59
if (thr != NULL) {
sys/ddb/db_thread.c
60
err = kdb_thr_select(thr);
sys/ddb/db_thread.c
63
(long)thr->td_tid);
sys/ddb/db_thread.c
82
struct thread *thr;
sys/ddb/db_thread.c
84
thr = kdb_thr_first();
sys/ddb/db_thread.c
85
while (!db_pager_quit && thr != NULL) {
sys/ddb/db_thread.c
86
db_printf(" %6ld (%p) (stack %p) ", (long)thr->td_tid, thr,
sys/ddb/db_thread.c
87
(void *)thr->td_kstack);
sys/ddb/db_thread.c
90
if (db_trace_thread(thr, 1) != 0)
sys/ddb/db_thread.c
94
thr = kdb_thr_next(thr);
sys/dev/bwi/bwirf.c
2125
int32_t thr;
sys/dev/bwi/bwirf.c
2135
thr = (rf->rf_nrssi[1] - rf->rf_nrssi[0]) * 32;
sys/dev/bwi/bwirf.c
2136
thr += 20 * (rf->rf_nrssi[0] + 1);
sys/dev/bwi/bwirf.c
2137
thr /= 40;
sys/dev/bwi/bwirf.c
2139
thr = rf->rf_nrssi[1] - 5;
sys/dev/bwi/bwirf.c
2141
if (thr < 0)
sys/dev/bwi/bwirf.c
2142
thr = 0;
sys/dev/bwi/bwirf.c
2143
else if (thr > 0x3e)
sys/dev/bwi/bwirf.c
2144
thr = 0x3e;
sys/dev/bwi/bwirf.c
2147
PHY_WRITE(mac, BWI_PHYR_NRSSI_THR_11B, (((uint16_t)thr) << 8) | 0x1c);
sys/dev/bwi/bwirf.c
2182
uint16_t thr;
sys/dev/bwi/bwirf.c
2211
thr = __SHIFTIN((uint32_t)thr1, NRSSI_THR1_MASK) |
sys/dev/bwi/bwirf.c
2213
PHY_FILT_SETBITS(mac, BWI_PHYR_NRSSI_THR_11G, 0xf000, thr);
sys/dev/hwt/hwt_backend.c
262
hwt_backend_thread_alloc(struct hwt_context *ctx, struct hwt_thread *thr)
sys/dev/hwt/hwt_backend.c
270
KASSERT(thr->private == NULL,
sys/dev/hwt/hwt_backend.c
272
error = ctx->hwt_backend->ops->hwt_backend_thread_alloc(thr);
sys/dev/hwt/hwt_backend.c
278
hwt_backend_thread_free(struct hwt_thread *thr)
sys/dev/hwt/hwt_backend.c
282
if (thr->backend->ops->hwt_backend_thread_free == NULL)
sys/dev/hwt/hwt_backend.c
284
KASSERT(thr->private != NULL,
sys/dev/hwt/hwt_backend.c
286
thr->backend->ops->hwt_backend_thread_free(thr);
sys/dev/hwt/hwt_context.c
141
struct hwt_thread *thr;
sys/dev/hwt/hwt_context.c
147
thr = TAILQ_FIRST(&ctx->threads);
sys/dev/hwt/hwt_context.c
148
if (thr)
sys/dev/hwt/hwt_context.c
149
TAILQ_REMOVE(&ctx->threads, thr, next);
sys/dev/hwt/hwt_context.c
152
if (thr == NULL)
sys/dev/hwt/hwt_context.c
155
HWT_THR_LOCK(thr);
sys/dev/hwt/hwt_context.c
157
wakeup(thr);
sys/dev/hwt/hwt_context.c
158
HWT_THR_UNLOCK(thr);
sys/dev/hwt/hwt_context.c
160
if (refcount_release(&thr->refcnt))
sys/dev/hwt/hwt_context.c
161
hwt_thread_free(thr);
sys/dev/hwt/hwt_hook.c
115
thr = hwt_thread_lookup(ctx, td);
sys/dev/hwt/hwt_hook.c
116
if (thr == NULL) {
sys/dev/hwt/hwt_hook.c
121
dprintf("%s: thr %p index %d tid %d on cpu_id %d\n", __func__, thr,
sys/dev/hwt/hwt_hook.c
122
thr->thread_id, td->td_tid, cpu_id);
sys/dev/hwt/hwt_hook.c
133
struct hwt_thread *thr;
sys/dev/hwt/hwt_hook.c
145
thr = hwt_thread_lookup(ctx, td);
sys/dev/hwt/hwt_hook.c
146
if (thr == NULL) {
sys/dev/hwt/hwt_hook.c
151
thr->state = HWT_THREAD_STATE_EXITED;
sys/dev/hwt/hwt_hook.c
153
dprintf("%s: thr %p index %d tid %d on cpu_id %d\n", __func__, thr,
sys/dev/hwt/hwt_hook.c
154
thr->thread_id, td->td_tid, cpu_id);
sys/dev/hwt/hwt_hook.c
166
struct hwt_thread *thr;
sys/dev/hwt/hwt_hook.c
180
thr = hwt_thread_lookup(ctx, td);
sys/dev/hwt/hwt_hook.c
181
if (thr == NULL) {
sys/dev/hwt/hwt_hook.c
192
refcount_acquire(&thr->refcnt);
sys/dev/hwt/hwt_hook.c
196
HWT_THR_LOCK(thr);
sys/dev/hwt/hwt_hook.c
197
msleep(thr, &thr->mtx, PCATCH, "hwt-mmap", 0);
sys/dev/hwt/hwt_hook.c
198
HWT_THR_UNLOCK(thr);
sys/dev/hwt/hwt_hook.c
201
if (refcount_release(&thr->refcnt))
sys/dev/hwt/hwt_hook.c
202
hwt_thread_free(thr);
sys/dev/hwt/hwt_hook.c
210
struct hwt_thread *thr;
sys/dev/hwt/hwt_hook.c
230
error = hwt_thread_alloc(&thr, path, bufsize, kva_req);
sys/dev/hwt/hwt_hook.c
245
hwt_thread_free(thr);
sys/dev/hwt/hwt_hook.c
250
error = hwt_backend_thread_alloc(ctx, thr);
sys/dev/hwt/hwt_hook.c
257
thr->vm->ctx = ctx;
sys/dev/hwt/hwt_hook.c
258
thr->ctx = ctx;
sys/dev/hwt/hwt_hook.c
259
thr->backend = ctx->hwt_backend;
sys/dev/hwt/hwt_hook.c
260
thr->thread_id = thread_id;
sys/dev/hwt/hwt_hook.c
261
thr->td = td;
sys/dev/hwt/hwt_hook.c
264
hwt_thread_insert(ctx, thr, entry);
sys/dev/hwt/hwt_hook.c
63
struct hwt_thread *thr;
sys/dev/hwt/hwt_hook.c
80
thr = hwt_thread_lookup(ctx, td);
sys/dev/hwt/hwt_hook.c
81
if (thr == NULL) {
sys/dev/hwt/hwt_hook.c
86
dprintf("%s: thr %p index %d tid %d on cpu_id %d\n", __func__, thr,
sys/dev/hwt/hwt_hook.c
87
thr->thread_id, td->td_tid, cpu_id);
sys/dev/hwt/hwt_hook.c
89
hwt_backend_configure(ctx, cpu_id, thr->thread_id);
sys/dev/hwt/hwt_hook.c
99
struct hwt_thread *thr;
sys/dev/hwt/hwt_ioctl.c
136
struct hwt_thread *thr;
sys/dev/hwt/hwt_ioctl.c
222
error = hwt_thread_alloc(&thr, path, ctx->bufsize,
sys/dev/hwt/hwt_ioctl.c
230
error = hwt_backend_thread_alloc(ctx, thr);
sys/dev/hwt/hwt_ioctl.c
247
thr->vm->ctx = ctx;
sys/dev/hwt/hwt_ioctl.c
248
thr->td = threads[i];
sys/dev/hwt/hwt_ioctl.c
249
thr->ctx = ctx;
sys/dev/hwt/hwt_ioctl.c
250
thr->backend = ctx->hwt_backend;
sys/dev/hwt/hwt_ioctl.c
251
thr->thread_id = thread_id;
sys/dev/hwt/hwt_ioctl.c
254
hwt_thread_insert(ctx, thr, entry);
sys/dev/hwt/hwt_thread.c
116
struct hwt_thread *thr;
sys/dev/hwt/hwt_thread.c
124
thr = malloc(sizeof(struct hwt_thread), M_HWT_THREAD,
sys/dev/hwt/hwt_thread.c
126
thr->vm = vm;
sys/dev/hwt/hwt_thread.c
128
mtx_init(&thr->mtx, "thr", NULL, MTX_DEF);
sys/dev/hwt/hwt_thread.c
130
refcount_init(&thr->refcnt, 1);
sys/dev/hwt/hwt_thread.c
132
vm->thr = thr;
sys/dev/hwt/hwt_thread.c
134
*thr0 = thr;
sys/dev/hwt/hwt_thread.c
140
hwt_thread_free(struct hwt_thread *thr)
sys/dev/hwt/hwt_thread.c
143
hwt_vm_free(thr->vm);
sys/dev/hwt/hwt_thread.c
145
if (thr->private != NULL)
sys/dev/hwt/hwt_thread.c
146
hwt_backend_thread_free(thr);
sys/dev/hwt/hwt_thread.c
147
free(thr, M_HWT_THREAD);
sys/dev/hwt/hwt_thread.c
155
hwt_thread_insert(struct hwt_context *ctx, struct hwt_thread *thr,
sys/dev/hwt/hwt_thread.c
160
TAILQ_INSERT_TAIL(&ctx->threads, thr, next);
sys/dev/hwt/hwt_thread.c
74
struct hwt_thread *thr;
sys/dev/hwt/hwt_thread.c
78
thr = TAILQ_FIRST(&ctx->threads);
sys/dev/hwt/hwt_thread.c
80
KASSERT(thr != NULL, ("thr is NULL"));
sys/dev/hwt/hwt_thread.c
82
return (thr);
sys/dev/hwt/hwt_thread.c
91
struct hwt_thread *thr;
sys/dev/hwt/hwt_thread.c
96
TAILQ_FOREACH(thr, &ctx->threads, next) {
sys/dev/hwt/hwt_thread.c
97
if (thr->td == td) {
sys/dev/hwt/hwt_thread.c
99
return (thr);
sys/dev/hwt/hwt_thread.h
52
void hwt_thread_free(struct hwt_thread *thr);
sys/dev/hwt/hwt_thread.h
55
void hwt_thread_insert(struct hwt_context *ctx, struct hwt_thread *thr, struct hwt_record_entry *entry);
sys/dev/hwt/hwt_thread.h
60
#define HWT_THR_LOCK(thr) mtx_lock(&(thr)->mtx)
sys/dev/hwt/hwt_thread.h
61
#define HWT_THR_UNLOCK(thr) mtx_unlock(&(thr)->mtx)
sys/dev/hwt/hwt_thread.h
62
#define HWT_THR_ASSERT_LOCKED(thr) mtx_assert(&(thr)->mtx, MA_OWNED)
sys/dev/hwt/hwt_vm.c
324
KASSERT(vm->thr != NULL, ("thr is NULL"));
sys/dev/hwt/hwt_vm.c
326
wakeup(vm->thr);
sys/dev/hwt/hwt_vm.h
41
struct hwt_thread *thr; /* thr mode only. */
sys/dev/qat/qat_common/adf_heartbeat.c
115
size_t ae, thr;
sys/dev/qat/qat_common/adf_heartbeat.c
155
for (thr = 0; thr < hb_ctrs; ++thr) {
sys/dev/qat/qat_common/adf_heartbeat.c
156
u16 req = curr[thr].req_heartbeat_cnt;
sys/dev/qat/qat_common/adf_heartbeat.c
157
u16 resp = curr[thr].resp_heartbeat_cnt;
sys/dev/qat/qat_common/adf_heartbeat.c
158
u16 last = prev[thr].resp_heartbeat_cnt;
sys/dev/qat/qat_common/adf_heartbeat.c
160
if ((thr == ADF_AE_ADMIN_THREAD || req != resp) &&
sys/dev/qat/qat_common/adf_heartbeat.c
162
u16 retry = ++count[thr];
sys/dev/qat/qat_common/adf_heartbeat.c
167
count[thr] = 0;
sys/gdb/gdb_main.c
825
struct thread *thr;
sys/gdb/gdb_main.c
835
thr = kdb_thr_lookup(tid);
sys/gdb/gdb_main.c
836
if (thr == NULL) {
sys/gdb/gdb_main.c
840
kdb_thr_select(thr);
sys/i386/i386/db_trace.c
571
db_trace_thread(struct thread *thr, int count)
sys/i386/i386/db_trace.c
576
ctx = kdb_thr_ctx(thr);
sys/i386/i386/db_trace.c
577
tf = thr == kdb_thread ? kdb_frame : NULL;
sys/i386/i386/db_trace.c
578
return (db_backtrace(thr, tf, (struct i386_frame *)ctx->pcb_ebp,
sys/kern/imgact_elf.c
1869
struct thread *thr;
sys/kern/imgact_elf.c
1884
thr = td;
sys/kern/imgact_elf.c
1885
while (thr != NULL) {
sys/kern/imgact_elf.c
1886
size += __elfN(prepare_register_notes)(td, list, thr);
sys/kern/imgact_elf.c
1888
__elfN(note_threadmd), thr);
sys/kern/imgact_elf.c
1890
thr = thr == td ? TAILQ_FIRST(&p->p_threads) :
sys/kern/imgact_elf.c
1891
TAILQ_NEXT(thr, td_plist);
sys/kern/imgact_elf.c
1892
if (thr == td)
sys/kern/imgact_elf.c
1893
thr = TAILQ_NEXT(thr, td_plist);
sys/kern/kern_sig.c
1329
struct thread *thr;
sys/kern/kern_sig.c
1331
FOREACH_THREAD_IN_PROC(td->td_proc, thr) {
sys/kern/kern_sig.c
1332
if (thr == td)
sys/kern/kern_sig.c
1333
thr->td_si = *si;
sys/kern/kern_sig.c
1335
thr->td_si.si_signo = 0;
sys/kern/subr_kdb.c
637
kdb_thr_ctx(struct thread *thr)
sys/kern/subr_kdb.c
643
if (thr == curthread)
sys/kern/subr_kdb.c
648
if (pc->pc_curthread == thr &&
sys/kern/subr_kdb.c
653
return (thr->td_pcb);
sys/kern/subr_kdb.c
660
struct thread *thr;
sys/kern/subr_kdb.c
669
thr = FIRST_THREAD_IN_PROC(p);
sys/kern/subr_kdb.c
670
if (thr != NULL)
sys/kern/subr_kdb.c
671
return (thr);
sys/kern/subr_kdb.c
692
struct thread *thr;
sys/kern/subr_kdb.c
694
thr = kdb_thr_first();
sys/kern/subr_kdb.c
695
while (thr != NULL && thr->td_tid != tid)
sys/kern/subr_kdb.c
696
thr = kdb_thr_next(thr);
sys/kern/subr_kdb.c
697
return (thr);
sys/kern/subr_kdb.c
701
kdb_thr_next(struct thread *thr)
sys/kern/subr_kdb.c
706
p = thr->td_proc;
sys/kern/subr_kdb.c
707
thr = TAILQ_NEXT(thr, td_plist);
sys/kern/subr_kdb.c
708
if (thr != NULL)
sys/kern/subr_kdb.c
709
return (thr);
sys/kern/subr_kdb.c
720
thr = FIRST_THREAD_IN_PROC(p);
sys/kern/subr_kdb.c
721
if (thr != NULL)
sys/kern/subr_kdb.c
722
return (thr);
sys/kern/subr_kdb.c
727
kdb_thr_select(struct thread *thr)
sys/kern/subr_kdb.c
729
if (thr == NULL)
sys/kern/subr_kdb.c
731
kdb_thread = thr;
sys/kern/subr_kdb.c
732
kdb_thrctx = kdb_thr_ctx(thr);
sys/riscv/riscv/db_trace.c
122
db_trace_thread(struct thread *thr, int count)
sys/riscv/riscv/db_trace.c
127
ctx = kdb_thr_ctx(thr);
sys/riscv/riscv/db_trace.c
132
db_stack_trace_cmd(thr, &frame);
sys/security/mac_ddb/mac_ddb.c
109
struct thread *thr;
sys/security/mac_ddb/mac_ddb.c
118
for (thr = kdb_thr_first(); thr != NULL; thr = kdb_thr_next(thr)) {
sys/security/mac_ddb/mac_ddb.c
119
if ((void *)thr == (void *)addr || tid == thr->td_tid)
tests/sys/file/flock_helper.c
1450
pthread_t thr[THREADS];
tests/sys/file/flock_helper.c
1492
error = pthread_create(&thr[i], NULL, test16_func, &tc);
tests/sys/file/flock_helper.c
1510
error = pthread_join(thr[i], &res);
tests/sys/kern/ssl_sendfile.c
136
ATF_REQUIRE(pthread_create(&c->thr, NULL, server_thread, c) == 0);
tests/sys/kern/ssl_sendfile.c
172
ATF_REQUIRE(pthread_join(c->thr, NULL) == 0);
tests/sys/kern/ssl_sendfile.c
58
pthread_t thr; /* server thread */
tests/sys/kern/unix_stream.c
211
pthread_t thr;
tests/sys/kern/unix_stream.c
215
ATF_REQUIRE(pthread_create(&thr, NULL, pthread_wrap, ctx) == 0);
tests/sys/kern/unix_stream.c
219
ATF_REQUIRE(pthread_peekjoin_np(thr, NULL) == EBUSY);
tests/sys/kern/unix_stream.c
221
return (thr);
tests/sys/kern/unix_stream.c
227
pthread_t thr;
tests/sys/kern/unix_stream.c
239
thr = pthread_create_blocked(ctx);
tests/sys/kern/unix_stream.c
245
ATF_REQUIRE(pthread_join(thr, NULL) == 0);
tests/sys/kern/unix_stream.c
429
pthread_t thr;
tests/sys/kern/unix_stream.c
435
thr = pthread_create_blocked(ctx);
tests/sys/kern/unix_stream.c
437
ATF_REQUIRE(pthread_join(thr, NULL) == 0);
tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c
49
pthread_t thr;
tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c
64
pthread_create(&thr, NULL, thread, &mtx);
tools/regression/pthread/mutex_isowned_np/mutex_isowned_np.c
65
pthread_join(thr, NULL);
tools/regression/pthread/unwind/cond_wait_cancel.cpp
32
pthread_create(&td, NULL, thr, NULL);
tools/regression/pthread/unwind/cond_wait_cancel2.cpp
49
pthread_create(&td, NULL, thr, NULL);
tools/regression/pthread/unwind/sem_wait_cancel.cpp
28
pthread_create(&td, NULL, thr, NULL);
tools/tools/nvmf/nvmfd/discovery.c
289
pthread_t thr;
tools/tools/nvmf/nvmfd/discovery.c
325
error = pthread_create(&thr, NULL, discovery_thread, dta);
tools/tools/nvmf/nvmfd/io.c
667
pthread_t thr;
tools/tools/nvmf/nvmfd/io.c
670
error = pthread_create(&thr, NULL, io_socket_thread,
usr.sbin/bhyve/bhyverun.c
573
pthread_t thr;
usr.sbin/bhyve/bhyverun.c
587
error = pthread_create(&thr, NULL, fbsdrun_start_thread, vi);