Home
last modified time | relevance | path

Searched refs:curthread (Results 1 – 25 of 714) sorted by relevance

12345678910>>...29

/freebsd-14-stable/lib/libthr/thread/
HDthr_syscalls.c100 struct pthread *curthread; in __thr_accept() local
103 curthread = _get_curthread(); in __thr_accept()
104 _thr_cancel_enter(curthread); in __thr_accept()
106 _thr_cancel_leave(curthread, ret == -1); in __thr_accept()
118 struct pthread *curthread; in __thr_accept4() local
121 curthread = _get_curthread(); in __thr_accept4()
122 _thr_cancel_enter(curthread); in __thr_accept4()
124 _thr_cancel_leave(curthread, ret == -1); in __thr_accept4()
133 struct pthread *curthread; in __thr_aio_suspend() local
136 curthread = _get_curthread(); in __thr_aio_suspend()
[all …]
HDthr_suspend_np.c50 struct pthread *curthread = _get_curthread(); in _pthread_suspend_np() local
58 else if ((ret = _thr_ref_add(curthread, thread, /*include dead*/0)) in _pthread_suspend_np()
61 THR_THREAD_LOCK(curthread, thread); in _pthread_suspend_np()
62 suspend_common(curthread, thread, 1); in _pthread_suspend_np()
64 THR_THREAD_UNLOCK(curthread, thread); in _pthread_suspend_np()
67 _thr_ref_delete(curthread, thread); in _pthread_suspend_np()
73 _thr_suspend_all_lock(struct pthread *curthread) in _thr_suspend_all_lock() argument
77 THR_LOCK_ACQUIRE(curthread, &_suspend_all_lock); in _thr_suspend_all_lock()
81 THR_LOCK_RELEASE(curthread, &_suspend_all_lock); in _thr_suspend_all_lock()
83 THR_LOCK_ACQUIRE(curthread, &_suspend_all_lock); in _thr_suspend_all_lock()
[all …]
HDthr_sig.c71 static void check_cancel(struct pthread *curthread, ucontext_t *ucp);
94 thr_signal_block_slow(struct pthread *curthread) in thr_signal_block_slow() argument
96 if (curthread->sigblock > 0) { in thr_signal_block_slow()
97 curthread->sigblock++; in thr_signal_block_slow()
100 __sys_sigprocmask(SIG_BLOCK, &_thr_maskset, &curthread->sigmask); in thr_signal_block_slow()
101 curthread->sigblock++; in thr_signal_block_slow()
105 thr_signal_unblock_slow(struct pthread *curthread) in thr_signal_unblock_slow() argument
107 if (--curthread->sigblock == 0) in thr_signal_unblock_slow()
108 __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); in thr_signal_unblock_slow()
112 thr_signal_block_fast(struct pthread *curthread) in thr_signal_block_fast() argument
[all …]
HDthr_malloc.c58 thr_malloc_lock(struct pthread *curthread) in thr_malloc_lock() argument
62 if (curthread == NULL) in thr_malloc_lock()
64 curthread->locklevel++; in thr_malloc_lock()
65 curtid = TID(curthread); in thr_malloc_lock()
73 thr_malloc_unlock(struct pthread *curthread) in thr_malloc_unlock() argument
76 if (curthread == NULL) in thr_malloc_unlock()
81 _thr_umutex_unlock(&thr_malloc_umtx, TID(curthread)); 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
[all …]
HDthr_list.c75 static void thr_destroy(struct pthread *curthread, struct pthread *thread);
97 _thr_gc(struct pthread *curthread) in _thr_gc() argument
103 THREAD_LIST_WRLOCK(curthread); in _thr_gc()
115 THREAD_LIST_UNLOCK(curthread); in _thr_gc()
128 _thr_free(curthread, td); in _thr_gc()
133 _thr_alloc(struct pthread *curthread) in _thr_alloc() argument
138 if (curthread != NULL) { in _thr_alloc()
140 _thr_gc(curthread); in _thr_alloc()
142 THR_LOCK_ACQUIRE(curthread, &free_thread_lock); in _thr_alloc()
147 THR_LOCK_RELEASE(curthread, &free_thread_lock); in _thr_alloc()
[all …]
HDthr_cancel.c47 testcancel(struct pthread *curthread) in testcancel() argument
49 if (__predict_false(SHOULD_CANCEL(curthread) && in testcancel()
50 !THR_IN_CRITICAL(curthread))) in testcancel()
55 _thr_testcancel(struct pthread *curthread) in _thr_testcancel() argument
57 testcancel(curthread); in _thr_testcancel()
63 struct pthread *curthread = _get_curthread(); in _thr_cancel() local
71 if ((ret = _thr_find_thread(curthread, pthread, 1)) == 0) { in _thr_cancel()
77 THR_THREAD_UNLOCK(curthread, pthread); in _thr_cancel()
85 struct pthread *curthread = _get_curthread(); in _thr_setcancelstate() local
99 oldval = atomic_swap_int(&curthread->cancel_enable, val); in _thr_setcancelstate()
[all …]
HDthr_exit.c137 struct pthread *curthread = _get_curthread(); in thread_unwind_stop() local
146 cfa >= (uintptr_t)curthread->unwind_stackend) { in thread_unwind_stop()
150 while ((cur = curthread->cleanup) != NULL && in thread_unwind_stop()
168 struct pthread *curthread = _get_curthread(); in thread_unwind() local
170 curthread->ex.exception_class = 0; in thread_unwind()
171 curthread->ex.exception_cleanup = thread_unwind_cleanup; in thread_unwind()
172 _Unwind_ForcedUnwind(&curthread->ex, thread_unwind_stop, NULL); in thread_unwind()
212 struct pthread *curthread = _get_curthread(); local
215 if (curthread->cancelling)
218 "1996 s16.2.5.2 does not allow this!", curthread);
[all …]
HDthr_spec.c59 struct pthread *curthread; in _thr_key_create() local
64 curthread = _get_curthread(); in _thr_key_create()
66 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _thr_key_create()
74 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thr_key_create()
80 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thr_key_create()
87 struct pthread *curthread; in _thr_key_delete() local
93 curthread = _get_curthread(); in _thr_key_delete()
94 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _thr_key_delete()
101 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _thr_key_delete()
108 struct pthread *curthread; in _thread_cleanupspecific() local
[all …]
HDthr_cond.c206 struct pthread *curthread; in cond_wait_kernel() local
209 curthread = _get_curthread(); in cond_wait_kernel()
210 robust = _mutex_enter_robust(curthread, mp); in cond_wait_kernel()
215 _mutex_leave_robust(curthread, mp); in cond_wait_kernel()
220 _thr_cancel_enter2(curthread, 0); in cond_wait_kernel()
224 _thr_cancel_leave(curthread, 0); in cond_wait_kernel()
242 _mutex_leave_robust(curthread, mp); in cond_wait_kernel()
245 _thr_testcancel(curthread); in cond_wait_kernel()
255 _mutex_leave_robust(curthread, mp); in cond_wait_kernel()
258 _thr_testcancel(curthread); in cond_wait_kernel()
[all …]
HDthr_rtld.c96 if (curthread != _thr_initial) \
97 errsave = curthread->error; \
103 if (curthread != _thr_initial) \
104 curthread->error = errsave; \
112 struct pthread *curthread; in _thr_rtld_rlock_acquire() local
116 curthread = _get_curthread(); in _thr_rtld_rlock_acquire()
120 THR_CRITICAL_ENTER(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()
[all …]
HDthr_fork.c84 struct pthread *curthread; in _thr_atfork() local
95 curthread = _get_curthread(); in _thr_atfork()
96 THR_CRITICAL_ENTER(curthread); in _thr_atfork()
100 THR_CRITICAL_LEAVE(curthread); in _thr_atfork()
112 struct pthread *curthread; in __pthread_cxa_finalize() local
117 curthread = _get_curthread(); in __pthread_cxa_finalize()
118 THR_CRITICAL_ENTER(curthread); in __pthread_cxa_finalize()
129 THR_CRITICAL_LEAVE(curthread); in __pthread_cxa_finalize()
152 struct pthread *curthread; in thr_fork_impl() local
171 curthread = _get_curthread(); in thr_fork_impl()
[all …]
HDthr_event.c42 _thr_report_creation(struct pthread *curthread, struct pthread *newthread) in _thr_report_creation() argument
44 curthread->event_buf.event = TD_CREATE; in _thr_report_creation()
45 curthread->event_buf.th_p = (uintptr_t)newthread; 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()
[all …]
HDthr_create.c47 static void thread_start(struct pthread *curthread);
56 struct pthread *curthread, *new_thread; in _pthread_create() local
76 curthread = _get_curthread(); in _pthread_create()
77 if ((new_thread = _thr_alloc(curthread)) == NULL) in _pthread_create()
94 if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) in _pthread_create()
99 new_thread->attr.prio = curthread->attr.prio; in _pthread_create()
100 new_thread->attr.sched_policy = curthread->attr.sched_policy; in _pthread_create()
108 _thr_free(curthread, new_thread); in _pthread_create()
139 _thr_link(curthread, new_thread); in _pthread_create()
150 if (SHOULD_REPORT_EVENT(curthread, TD_CREATE) || cpusetp != NULL) { in _pthread_create()
[all …]
HDthr_mutex.c80 static void mutex_init_robust(struct pthread *curthread);
143 mutex_assert_not_owned(struct pthread *curthread __unused, in mutex_assert_not_owned()
154 (is_pshared_mutex(m) && curthread->robust_list == in mutex_assert_not_owned()
156 (!is_pshared_mutex(m) && curthread->priv_robust_list == in mutex_assert_not_owned()
161 m->m_rb_prev, (void *)curthread->robust_list, in mutex_assert_not_owned()
162 (void *)curthread->priv_robust_list); in mutex_assert_not_owned()
181 _mutex_enter_robust(struct pthread *curthread, struct pthread_mutex *m) in _mutex_enter_robust() argument
185 if (__predict_false(curthread->inact_mtx != 0)) in _mutex_enter_robust()
191 mutex_init_robust(curthread); in _mutex_enter_robust()
192 curthread->inact_mtx = (uintptr_t)&m->m_lock; in _mutex_enter_robust()
[all …]
HDthr_resume_np.c49 struct pthread *curthread = _get_curthread(); in _pthread_resume_np() local
53 if ((ret = _thr_find_thread(curthread, thread, /*include dead*/0)) == 0) { in _pthread_resume_np()
56 THR_THREAD_UNLOCK(curthread, thread); in _pthread_resume_np()
64 struct pthread *curthread = _get_curthread(); in _pthread_resume_all_np() local
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()
[all …]
HDthr_pshared.c68 pshared_rlock(struct pthread *curthread) in pshared_rlock() argument
71 curthread->locklevel++; in pshared_rlock()
76 pshared_wlock(struct pthread *curthread) in pshared_wlock() argument
79 curthread->locklevel++; in pshared_wlock()
84 pshared_unlock(struct pthread *curthread) in pshared_unlock() argument
88 curthread->locklevel--; in pshared_unlock()
89 _thr_ast(curthread); in pshared_unlock()
103 pshared_gc(struct pthread *curthread) in pshared_gc() argument
109 pshared_wlock(curthread); in pshared_gc()
122 pshared_unlock(curthread); in pshared_gc()
[all …]
HDthr_join.c49 struct pthread *curthread = _get_curthread(); in backout_join() local
51 THR_THREAD_LOCK(curthread, pthread); in backout_join()
53 THR_THREAD_UNLOCK(curthread, pthread); in backout_join()
87 struct pthread *curthread = _get_curthread(); in join_common() local
96 if (pthread == curthread) in join_common()
99 if ((ret = _thr_find_thread(curthread, pthread, 1)) != 0) in join_common()
109 THR_THREAD_UNLOCK(curthread, pthread); in join_common()
119 THR_THREAD_UNLOCK(curthread, pthread); in join_common()
124 pthread->joiner = curthread; in join_common()
126 THR_THREAD_UNLOCK(curthread, pthread); in join_common()
[all …]
HDthr_info.c60 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()
82 if (_thr_find_thread(curthread, thread, 0) == 0) { 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()
[all …]
HDthr_clean.c59 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()
HDthr_barrier.c48 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 …]
HDthr_rwlock.c171 struct pthread *curthread = _get_curthread(); in rwlock_rdlock_common() local
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()
[all …]
/freebsd-14-stable/tools/sched/
HDschedgraph.d83 …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…
93 …e, args[0]->td_tid, args[0]->td_priority, arg2, 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 /
[all …]
/freebsd-14-stable/sys/security/audit/
HDaudit.h158 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-stable/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/
HDfasttrap_isa.c221 fill_regs(curthread, &r); in fasttrap_pid_getarg()
232 fill_regs(curthread, &r); in fasttrap_usdt_getarg()
348 fill_regs(curthread, &reg); in fasttrap_pid_probe()
358 if (curthread->t_dtrace_step) { in fasttrap_pid_probe()
359 ASSERT(curthread->t_dtrace_on); in fasttrap_pid_probe()
360 fasttrap_sigtrap(p, curthread, pc); 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()
370 curthread->t_dtrace_scrpc = 0; in fasttrap_pid_probe()
[all …]
/freebsd-14-stable/sys/x86/cpufreq/
HDhwpstate_intel.c136 thread_lock(curthread); in intel_hwp_dump_sysctl_handler()
137 sched_bind(curthread, pc->pc_cpuid); in intel_hwp_dump_sysctl_handler()
138 thread_unlock(curthread); in intel_hwp_dump_sysctl_handler()
184 thread_lock(curthread); in intel_hwp_dump_sysctl_handler()
185 sched_unbind(curthread); in intel_hwp_dump_sysctl_handler()
186 thread_unlock(curthread); in intel_hwp_dump_sysctl_handler()
263 thread_lock(curthread); in sysctl_epp_select()
264 sched_bind(curthread, pc->pc_cpuid); in sysctl_epp_select()
265 thread_unlock(curthread); in sysctl_epp_select()
322 thread_lock(curthread); in sysctl_epp_select()
[all …]

12345678910>>...29