| /freebsd-14.2/lib/libthr/thread/ |
| H A D | thr_syscalls.c | 100 struct pthread *curthread; in __thr_accept() local 118 struct pthread *curthread; in __thr_accept4() local 133 struct pthread *curthread; in __thr_aio_suspend() local 154 struct pthread *curthread; in __thr_close() local 172 struct pthread *curthread; in __thr_connect() local 193 struct pthread *curthread; in __thr_fcntl() local 218 struct pthread *curthread; in __thr_fsync() local 232 struct pthread *curthread; in __thr_fdatasync() local 250 struct pthread *curthread; in __thr_msync() local 265 struct pthread *curthread; in __thr_clock_nanosleep() local [all …]
|
| H A D | thr_suspend_np.c | 86 _single_thread = curthread; in _thr_suspend_all_lock() 112 curthread->no_cancel = 1; in _pthread_suspend_all_np() 113 _thr_suspend_all_lock(curthread); in _pthread_suspend_all_np() 114 THREAD_LIST_RDLOCK(curthread); in _pthread_suspend_all_np() 116 if (thread != curthread) { in _pthread_suspend_all_np() 128 if (thread != curthread) { in _pthread_suspend_all_np() 133 THREAD_LIST_UNLOCK(curthread); in _pthread_suspend_all_np() 135 THR_REF_ADD(curthread, thread); in _pthread_suspend_all_np() 141 THREAD_LIST_RDLOCK(curthread); in _pthread_suspend_all_np() 152 THREAD_LIST_UNLOCK(curthread); in _pthread_suspend_all_np() [all …]
|
| H A D | thr_sig.c | 97 curthread->sigblock++; in thr_signal_block_slow() 101 curthread->sigblock++; in thr_signal_block_slow() 197 check_suspend(curthread); in sigcancel_handler() 211 struct pthread *curthread; in thr_sighandler() local 325 check_suspend(curthread); in _thr_ast() 336 !curthread->cancel_enable || curthread->no_cancel)) in check_cancel() 430 THR_UMUTEX_LOCK(curthread, &(curthread)->lock); in check_suspend() 432 curthread->cycle++; in check_suspend() 445 THR_UMUTEX_UNLOCK(curthread, &(curthread)->lock); in check_suspend() 447 THR_UMUTEX_LOCK(curthread, &(curthread)->lock); in check_suspend() [all …]
|
| H A D | thr_cancel.c | 57 testcancel(curthread); in _thr_testcancel() 95 if (curthread->cancel_async) in _thr_setcancelstate() 96 testcancel(curthread); in _thr_setcancelstate() 119 testcancel(curthread); in _thr_setcanceltype() 138 struct pthread *curthread; in _Tthr_testcancel() local 142 testcancel(curthread); in _Tthr_testcancel() 148 curthread->cancel_point = 1; in _thr_cancel_enter() 149 testcancel(curthread); in _thr_cancel_enter() 155 curthread->cancel_point = 1; in _thr_cancel_enter2() 159 thr_wake(curthread->tid); in _thr_cancel_enter2() [all …]
|
| H A D | thr_list.c | 103 THREAD_LIST_WRLOCK(curthread); in _thr_gc() 115 THREAD_LIST_UNLOCK(curthread); in _thr_gc() 128 _thr_free(curthread, td); in _thr_gc() 138 if (curthread != NULL) { in _thr_alloc() 140 _thr_gc(curthread); in _thr_alloc() 169 if (curthread != NULL) { in _thr_alloc() 196 if (curthread != NULL) { in _thr_free() 236 THREAD_LIST_WRLOCK(curthread); in _thr_link() 238 THREAD_LIST_UNLOCK(curthread); in _thr_link() 248 THREAD_LIST_WRLOCK(curthread); in _thr_unlink() [all …]
|
| H A D | thr_malloc.c | 62 if (curthread == NULL) in thr_malloc_lock() 64 curthread->locklevel++; in thr_malloc_lock() 65 curtid = TID(curthread); in thr_malloc_lock() 76 if (curthread == NULL) in thr_malloc_unlock() 82 curthread->locklevel--; in thr_malloc_unlock() 83 _thr_ast(curthread); in thr_malloc_unlock() 89 struct pthread *curthread; in __thr_calloc() local 93 thr_malloc_lock(curthread); in __thr_calloc() 102 struct pthread *curthread; in __thr_free() local 113 struct pthread *curthread; in __thr_malloc() local [all …]
|
| H A D | thr_exit.c | 215 if (curthread->cancelling) 221 curthread->cancelling = 1; 222 curthread->no_cancel = 1; 237 curthread->ret = status; 281 free(curthread->name); 282 curthread->name = NULL; 301 THR_LOCK(curthread); 304 curthread->cycle++; 307 if (!curthread->force_exit && SHOULD_REPORT_EVENT(curthread, TD_DEATH)) 313 curthread->refcount--; [all …]
|
| H A D | thr_spec.c | 59 struct pthread *curthread; in _thr_key_create() local 64 curthread = _get_curthread(); in _thr_key_create() 87 struct pthread *curthread; in _thr_key_delete() local 93 curthread = _get_curthread(); in _thr_key_delete() 108 struct pthread *curthread; in _thread_cleanupspecific() local 113 curthread = _get_curthread(); in _thread_cleanupspecific() 114 if (curthread->specific == NULL) in _thread_cleanupspecific() 158 __thr_free(curthread->specific); in _thread_cleanupspecific() 159 curthread->specific = NULL; in _thread_cleanupspecific() 228 struct pthread *curthread; in _thr_tsd_unload() local [all …]
|
| H A D | thr_cond.c | 206 struct pthread *curthread; in cond_wait_kernel() local 278 struct pthread *curthread; in cond_wait_user() local 287 _thr_testcancel(curthread); in cond_wait_user() 297 curthread->mutex_obj = mp; in cond_wait_user() 298 _sleepq_add(cvp, curthread); in cond_wait_user() 300 _thr_clear_wake(curthread); in cond_wait_user() 343 curthread->mutex_obj = NULL; in cond_wait_user() 462 curthread->defer_waiters[curthread->nwaiter_defer++] = in cond_signal_common() 475 struct pthread *curthread; member 485 struct pthread *curthread = ba->curthread; in drop_cb() local [all …]
|
| H A D | thr_fork.c | 84 struct pthread *curthread; in _thr_atfork() local 92 curthread = _get_curthread(); in _thr_atfork() 96 THR_CRITICAL_ENTER(curthread); in _thr_atfork() 108 struct pthread *curthread; in __pthread_cxa_finalize() local 113 curthread = _get_curthread(); in __pthread_cxa_finalize() 148 struct pthread *curthread; in thr_fork_impl() local 167 curthread = _get_curthread(); in thr_fork_impl() 169 curthread->no_cancel = 1; in thr_fork_impl() 181 _thr_signal_block(curthread); in thr_fork_impl() 236 thr_self(&curthread->tid); in thr_fork_impl() [all …]
|
| H A D | thr_rtld.c | 112 struct pthread *curthread; in _thr_rtld_rlock_acquire() local 116 curthread = _get_curthread(); in _thr_rtld_rlock_acquire() 123 curthread->rdlock_count++; in _thr_rtld_rlock_acquire() 130 struct pthread *curthread; in _thr_rtld_wlock_acquire() local 134 curthread = _get_curthread(); in _thr_rtld_wlock_acquire() 147 struct pthread *curthread; in _thr_rtld_lock_release() local 152 curthread = _get_curthread(); in _thr_rtld_lock_release() 170 curthread->rdlock_count--; in _thr_rtld_lock_release() 202 struct pthread *curthread; in _thr_dlerror_loc() local 211 struct pthread *curthread; in _thr_dlerror_seen() local [all …]
|
| H A D | thr_event.c | 44 curthread->event_buf.event = TD_CREATE; in _thr_report_creation() 46 curthread->event_buf.data = 0; in _thr_report_creation() 47 THR_UMUTEX_LOCK(curthread, &_thr_event_lock); in _thr_report_creation() 48 _thread_last_event = curthread; in _thr_report_creation() 51 THR_UMUTEX_UNLOCK(curthread, &_thr_event_lock); in _thr_report_creation() 55 _thr_report_death(struct pthread *curthread) in _thr_report_death() argument 57 curthread->event_buf.event = TD_DEATH; in _thr_report_death() 58 curthread->event_buf.th_p = (uintptr_t)curthread; in _thr_report_death() 59 curthread->event_buf.data = 0; in _thr_report_death() 60 THR_UMUTEX_LOCK(curthread, &_thr_event_lock); in _thr_report_death() [all …]
|
| H A D | thr_create.c | 76 curthread = _get_curthread(); in _pthread_create() 108 _thr_free(curthread, new_thread); in _pthread_create() 139 _thr_link(curthread, new_thread); in _pthread_create() 256 set = curthread->sigmask; in thread_start() 264 THR_LOCK(curthread); in thread_start() 265 THR_UNLOCK(curthread); in thread_start() 267 if (curthread->force_exit) in thread_start() 273 _thr_ast(curthread); in thread_start() 284 curthread->unwind_stackend = (char *)curthread->attr.stackaddr_attr + in thread_start() 285 curthread->attr.stacksize_attr; in thread_start() [all …]
|
| H A D | thr_resume_np.c | 56 THR_THREAD_UNLOCK(curthread, thread); in _pthread_resume_np() 68 old_nocancel = curthread->no_cancel; in _pthread_resume_all_np() 69 curthread->no_cancel = 1; in _pthread_resume_all_np() 70 _thr_suspend_all_lock(curthread); in _pthread_resume_all_np() 72 THREAD_LIST_RDLOCK(curthread); in _pthread_resume_all_np() 75 if (thread != curthread) { in _pthread_resume_all_np() 76 THR_THREAD_LOCK(curthread, thread); in _pthread_resume_all_np() 83 THREAD_LIST_UNLOCK(curthread); in _pthread_resume_all_np() 84 _thr_suspend_all_unlock(curthread); in _pthread_resume_all_np() 85 curthread->no_cancel = old_nocancel; in _pthread_resume_all_np() [all …]
|
| H A D | thr_mutex.c | 204 curthread->inact_mtx = 0; in _mutex_leave_robust() 225 if (curthread == NULL) in mutex_init_robust() 452 queue_fork(curthread, &curthread->mq[TMQ_NORM], in _mutex_fork() 454 queue_fork(curthread, &curthread->mq[TMQ_NORM_PP], in _mutex_fork() 456 queue_fork(curthread, &curthread->mq[TMQ_ROBUST_PP], in _mutex_fork() 617 struct pthread *curthread; in __Tthr_mutex_trylock() local 626 id = TID(curthread); in __Tthr_mutex_trylock() 653 id = TID(curthread); in mutex_lock_sleep() 718 struct pthread *curthread; in mutex_lock_common() local 813 struct pthread *curthread; in _mutex_cv_attach() local [all …]
|
| H A D | thr_pshared.c | 71 curthread->locklevel++; in pshared_rlock() 79 curthread->locklevel++; in pshared_wlock() 88 curthread->locklevel--; in pshared_unlock() 89 _thr_ast(curthread); in pshared_unlock() 109 pshared_wlock(curthread); in pshared_gc() 122 pshared_unlock(curthread); in pshared_gc() 219 pshared_wlock(curthread); in pshared_destroy() 221 pshared_unlock(curthread); in pshared_destroy() 228 struct pthread *curthread; in __thr_pshared_offpage() local 251 pshared_wlock(curthread); in __thr_pshared_offpage() [all …]
|
| H A D | thr_join.c | 51 THR_THREAD_LOCK(curthread, pthread); in backout_join() 53 THR_THREAD_UNLOCK(curthread, pthread); in backout_join() 96 if (pthread == curthread) in join_common() 124 pthread->joiner = curthread; in join_common() 126 THR_THREAD_UNLOCK(curthread, pthread); in join_common() 129 _thr_cancel_enter(curthread); in join_common() 133 _thr_testcancel(curthread); in join_common() 149 _thr_cancel_leave(curthread, 0); in join_common() 150 THR_CLEANUP_POP(curthread, 0); in join_common() 153 THR_THREAD_LOCK(curthread, pthread); in join_common() [all …]
|
| H A D | thr_info.c | 60 struct pthread *curthread; in _pthread_setname_np() local 71 curthread = _get_curthread(); in _pthread_setname_np() 72 if (curthread == thread) { in _pthread_setname_np() 74 THR_THREAD_LOCK(curthread, thread); in _pthread_setname_np() 79 THR_THREAD_UNLOCK(curthread, thread); in _pthread_setname_np() 91 THR_THREAD_UNLOCK(curthread, thread); in _pthread_setname_np() 121 struct pthread *curthread; in _thr_getname_np() local 125 curthread = _get_curthread(); in _thr_getname_np() 126 if (curthread == thread) { in _thr_getname_np() 127 THR_THREAD_LOCK(curthread, thread); in _thr_getname_np() [all …]
|
| H A D | thr_clean.c | 59 struct pthread *curthread = _get_curthread(); in __thr_cleanup_push_imp() local 66 newbuf->prev = curthread->cleanup; in __thr_cleanup_push_imp() 67 curthread->cleanup = newbuf; in __thr_cleanup_push_imp() 73 struct pthread *curthread = _get_curthread(); in __thr_cleanup_pop_imp() local 76 if ((old = curthread->cleanup) != NULL) { in __thr_cleanup_pop_imp() 77 curthread->cleanup = old->prev; in __thr_cleanup_pop_imp() 88 struct pthread *curthread = _get_curthread(); in _thr_cleanup_push() local 91 curthread->unwind_disabled = 1; in _thr_cleanup_push() 98 newbuf->prev = curthread->cleanup; in _thr_cleanup_push() 99 curthread->cleanup = newbuf; in _thr_cleanup_push()
|
| H A D | thr_barrier.c | 48 struct pthread *curthread; in _pthread_barrier_destroy() local 65 curthread = _get_curthread(); in _pthread_barrier_destroy() 66 THR_UMUTEX_LOCK(curthread, &bar->b_lock); in _pthread_barrier_destroy() 68 THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); in _pthread_barrier_destroy() 75 THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); in _pthread_barrier_destroy() 80 THR_UMUTEX_LOCK(curthread, &bar->b_lock); in _pthread_barrier_destroy() 85 THR_UMUTEX_UNLOCK(curthread, &bar->b_lock); in _pthread_barrier_destroy() 133 struct pthread *curthread; in _pthread_barrier_wait() local 148 curthread = _get_curthread(); in _pthread_barrier_wait() 149 THR_UMUTEX_LOCK(curthread, &bar->b_lock); in _pthread_barrier_wait() [all …]
|
| H A D | thr_rwlock.c | 180 if (curthread->rdlock_count) { in rwlock_rdlock_common() 204 curthread->rdlock_count++; in rwlock_rdlock_common() 225 curthread->rdlock_count++; in rwlock_rdlock_common() 247 struct pthread *curthread; in _Tthr_rwlock_tryrdlock() local 257 curthread = _get_curthread(); in _Tthr_rwlock_tryrdlock() 258 if (curthread->rdlock_count) { in _Tthr_rwlock_tryrdlock() 278 curthread->rdlock_count++; in _Tthr_rwlock_tryrdlock() 285 struct pthread *curthread; in _Tthr_rwlock_trywrlock() local 294 curthread = _get_curthread(); in _Tthr_rwlock_trywrlock() 297 prwlock->owner = TID(curthread); in _Tthr_rwlock_trywrlock() [all …]
|
| /freebsd-14.2/tools/sched/ |
| H A D | schedgraph.d | 83 …exit\", attributes: prio:td\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, cu… 88 …exit\", attributes: prio:td\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, cu… 98 …, linkedto:\"%s/%s tid %d\"\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, cu… 103 …td_name, args[0]->td_tid, args[0]->td_priority, curthread->td_proc->p_comm, curthread->td_name, cu… 104 …: linkedto:\"%s/%s tid %d\"\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, cu… 109 …td_name, args[0]->td_tid, args[0]->td_priority, curthread->td_proc->p_comm, curthread->td_name, cu… 118 / curthread->td_flags & TDF_IDLETD / 120 …tributes: prio:%d\n", cpu, timestamp, curthread->td_proc->p_comm, curthread->td_name, curthread->t… 124 / (curthread->td_flags & TDF_IDLETD) == 0 / 126 …curthread->td_proc->p_comm, curthread->td_name, curthread->td_tid, KTDSTATE[curthread], curthread-… [all …]
|
| /freebsd-14.2/sys/security/audit/ |
| H A D | audit.h | 158 if (AUDITING_TD(curthread)) \ 163 if (AUDITING_TD(curthread)) \ 168 if (AUDITING_TD(curthread)) \ 173 if (AUDITING_TD(curthread)) \ 178 if (AUDITING_TD(curthread)) \ 183 if (AUDITING_TD(curthread)) \ 188 if (AUDITING_TD(curthread)) \ 193 if (AUDITING_TD(curthread)) \ 198 if (AUDITING_TD(curthread)) \ 203 if (AUDITING_TD(curthread)) \ [all …]
|
| /freebsd-14.2/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/ |
| H A D | fasttrap_isa.c | 221 fill_regs(curthread, &r); in fasttrap_pid_getarg() 232 fill_regs(curthread, &r); in fasttrap_usdt_getarg() 348 fill_regs(curthread, ®); in fasttrap_pid_probe() 367 curthread->t_dtrace_ft = 0; in fasttrap_pid_probe() 368 curthread->t_dtrace_pc = 0; in fasttrap_pid_probe() 369 curthread->t_dtrace_npc = 0; in fasttrap_pid_probe() 495 curthread->t_dtrace_on = 1; in fasttrap_pid_probe() 525 set_regs(curthread, rp); in fasttrap_pid_probe() 538 curthread->t_dtrace_pc = 0; in fasttrap_return_probe() 539 curthread->t_dtrace_npc = 0; in fasttrap_return_probe() [all …]
|
| /freebsd-14.2/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/misc/ |
| H A D | tst.roch.d | 46 /(self->done == 0) && (curthread->t_cpu->cpu_intr_actv == 0) / 50 (long long)curthread, pid, tid, 56 /(self->done == 0) && (curthread->t_cpu->cpu_intr_actv == 0) / 60 (long long) curthread, pid, tid, 68 (long long)curthread, pid, tid); 74 (long long)curthread, pid, tid, (int)arg1, (int)arg0); 80 (long long)curthread, pid, tid, arg0); 86 (long long) curthread, pid, tid, arg0);
|