Home
last modified time | relevance | path

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

12345678910>>...15

/dragonfly/lib/libthread_xu/thread/
HDthr_syscalls.c169 pthread_t curthread; in __accept() local
173 curthread = tls_get_curthread(); in __accept()
174 oldcancel = _thr_cancel_enter(curthread); in __accept()
176 _thr_cancel_leave(curthread, oldcancel); in __accept()
187 pthread_t curthread = tls_get_curthread(); in _aio_suspend() local
191 oldcancel = _thr_cancel_enter(curthread); in _aio_suspend()
193 _thr_cancel_leave(curthread, oldcancel); in _aio_suspend()
203 pthread_t curthread = tls_get_curthread(); in __close() local
207 oldcancel = _thr_cancel_enter(curthread); in __close()
209 _thr_cancel_leave(curthread, oldcancel); in __close()
[all …]
HDthr_suspend_np.c45 pthread_t curthread = tls_get_curthread(); in _pthread_suspend_np() local
49 if (thread == curthread) in _pthread_suspend_np()
53 else if ((ret = _thr_ref_add(curthread, thread, /*include dead*/0)) in _pthread_suspend_np()
56 THR_THREAD_LOCK(curthread, thread); in _pthread_suspend_np()
57 suspend_common(curthread, thread, 1); in _pthread_suspend_np()
59 THR_THREAD_UNLOCK(curthread, thread); in _pthread_suspend_np()
62 _thr_ref_delete(curthread, thread); in _pthread_suspend_np()
70 pthread_t curthread = tls_get_curthread(); in _pthread_suspend_all_np() local
74 THREAD_LIST_LOCK(curthread); in _pthread_suspend_all_np()
77 if (thread != curthread) { in _pthread_suspend_all_np()
[all …]
HDthr_exit.c81 pthread_t curthread = tls_get_curthread(); in _thr_exit_cleanup() local
91 _mutex_unlock_private(curthread); in _thr_exit_cleanup()
102 pthread_t curthread = tls_get_curthread(); in _pthread_exit() local
105 if ((curthread->cancelflags & THR_CANCEL_EXITING) != 0) { in _pthread_exit()
108 "1996 s16.2.5.2 does not allow this!", curthread); in _pthread_exit()
112 atomic_set_int(&curthread->cancelflags, THR_CANCEL_EXITING); in _pthread_exit()
117 curthread->ret = status; in _pthread_exit()
118 while (curthread->cleanup != NULL) { in _pthread_exit()
132 pthread_t curthread = tls_get_curthread(); in exit_thread() local
135 if (curthread->specific != NULL) { in exit_thread()
[all …]
HDthr_list.c83 static void thr_destroy(pthread_t curthread, pthread_t thread);
104 _thr_gc(pthread_t curthread) in _thr_gc() argument
110 THREAD_LIST_LOCK(curthread); in _thr_gc()
132 THREAD_LIST_UNLOCK(curthread); in _thr_gc()
145 _thr_free(curthread, td); in _thr_gc()
150 _thr_alloc(pthread_t curthread) in _thr_alloc() argument
155 if (curthread != NULL) { in _thr_alloc()
157 _thr_gc(curthread); in _thr_alloc()
159 THR_LOCK_ACQUIRE(curthread, &free_thread_lock); in _thr_alloc()
164 THR_LOCK_RELEASE(curthread, &free_thread_lock); in _thr_alloc()
[all …]
HDthr_sig.c63 pthread_t curthread = tls_get_curthread(); in sigcancel_handler() local
65 if (curthread->cancelflags & THR_CANCEL_AT_POINT) in sigcancel_handler()
67 _thr_ast(curthread); in sigcancel_handler()
71 _thr_ast(pthread_t curthread) in _thr_ast() argument
73 if (!THR_IN_CRITICAL(curthread)) { in _thr_ast()
74 if (__predict_false((curthread->flags & in _thr_ast()
77 _thr_suspend_check(curthread); in _thr_ast()
82 _thr_suspend_check(pthread_t curthread) in _thr_suspend_check() argument
89 _thr_signal_block(curthread); in _thr_suspend_check()
96 curthread->critical_count++; in _thr_suspend_check()
[all …]
HDthr_fork.c89 pthread_t curthread; in _pthread_atfork() local
96 curthread = tls_get_curthread(); in _pthread_atfork()
100 THR_UMTX_LOCK(curthread, &_thr_atfork_lock); in _pthread_atfork()
102 THR_UMTX_UNLOCK(curthread, &_thr_atfork_lock); in _pthread_atfork()
120 pthread_t curthread; in _thr_atfork_kern() local
125 curthread = tls_get_curthread(); in _thr_atfork_kern()
129 THR_UMTX_LOCK(curthread, &_thr_atfork_lock); in _thr_atfork_kern()
131 THR_UMTX_UNLOCK(curthread, &_thr_atfork_lock); in _thr_atfork_kern()
137 pthread_t curthread; in __pthread_cxa_finalize() local
140 curthread = tls_get_curthread(); in __pthread_cxa_finalize()
[all …]
HDthr_mutex.c115 mutex_log2(pthread_t curthread, pthread_mutex_t m, int op) in mutex_log2() argument
117 if (curthread) { in mutex_log2()
118 if (curthread->tid < 32) in mutex_log2()
119 m->m_lastop[curthread->tid] = in mutex_log2()
131 mutex_log2(pthread_t curthread __unused, in mutex_log2()
281 _mutex_fork(pthread_t curthread, lwpid_t tid) in _mutex_fork() argument
285 TAILQ_FOREACH(m, &curthread->mutexq, m_qe) in _mutex_fork()
292 pthread_t curthread = tls_get_curthread(); in _pthread_mutex_destroy() local
305 ret = THR_UMTX_TRYLOCK_PERSIST(curthread, &(*mutex)->m_lock); in _pthread_mutex_destroy()
317 THR_UMTX_UNLOCK_PERSIST(curthread, &(*mutex)->m_lock); in _pthread_mutex_destroy()
[all …]
HDthr_create.c58 pthread_t curthread, new_thread; in _pthread_create() local
70 curthread = tls_get_curthread(); in _pthread_create()
71 if ((new_thread = _thr_alloc(curthread)) == NULL) in _pthread_create()
82 if (curthread->attr.flags & PTHREAD_SCOPE_SYSTEM) in _pthread_create()
97 _thr_free(curthread, new_thread); in _pthread_create()
118 THR_LOCK(curthread); in _pthread_create()
119 new_thread->base_priority = curthread->base_priority; in _pthread_create()
120 new_thread->attr.prio = curthread->attr.prio; in _pthread_create()
121 new_thread->attr.sched_policy = curthread->attr.sched_policy; in _pthread_create()
122 THR_UNLOCK(curthread); in _pthread_create()
[all …]
HDthr_spec.c49 pthread_t curthread; in _pthread_key_create() local
55 curthread = tls_get_curthread(); in _pthread_key_create()
58 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _pthread_key_create()
66 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _pthread_key_create()
73 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _pthread_key_create()
80 pthread_t curthread = tls_get_curthread(); in _pthread_key_delete() local
85 THR_LOCK_ACQUIRE(curthread, &_keytable_lock); in _pthread_key_delete()
93 THR_LOCK_RELEASE(curthread, &_keytable_lock); in _pthread_key_delete()
102 pthread_t curthread = tls_get_curthread(); in _thread_cleanupspecific() local
108 if (curthread->specific == NULL) in _thread_cleanupspecific()
[all …]
HDthr_cancel.c38 pthread_t curthread = tls_get_curthread(); in _pthread_cancel() local
48 if ((ret = _thr_ref_add(curthread, pthread, 0)) != 0) { in _pthread_cancel()
63 _thr_ref_delete(curthread, pthread); in _pthread_cancel()
69 testcancel(pthread_t curthread) in testcancel() argument
73 newval = curthread->cancelflags; in testcancel()
81 pthread_t curthread = tls_get_curthread(); in _pthread_setcancelstate() local
84 oldval = curthread->cancelflags; in _pthread_setcancelstate()
90 atomic_set_int(&curthread->cancelflags, THR_CANCEL_DISABLE); in _pthread_setcancelstate()
93 atomic_clear_int(&curthread->cancelflags, THR_CANCEL_DISABLE); in _pthread_setcancelstate()
94 testcancel(curthread); in _pthread_setcancelstate()
[all …]
HDthr_event.c45 _thr_report_creation(pthread_t curthread, pthread_t newthread) in _thr_report_creation() argument
47 curthread->event_buf.event = TD_CREATE; in _thr_report_creation()
48 curthread->event_buf.th_p = (td_thrhandle_t *)newthread; in _thr_report_creation()
49 curthread->event_buf.data = 0; in _thr_report_creation()
50 THR_UMTX_LOCK(curthread, &_thr_event_lock); in _thr_report_creation()
51 _thread_last_event = curthread; in _thr_report_creation()
54 THR_UMTX_UNLOCK(curthread, &_thr_event_lock); in _thr_report_creation()
58 _thr_report_death(pthread_t curthread) in _thr_report_death() argument
60 curthread->event_buf.event = TD_DEATH; in _thr_report_death()
61 curthread->event_buf.th_p = (td_thrhandle_t *)curthread; in _thr_report_death()
[all …]
HDthr_setschedparam.c47 pthread_t curthread = tls_get_curthread(); in _pthread_setschedparam() local
50 if (pthread == curthread) { in _pthread_setschedparam()
51 THR_LOCK(curthread); in _pthread_setschedparam()
52 if (curthread->attr.sched_policy == policy && in _pthread_setschedparam()
53 curthread->attr.prio == param->sched_priority) { in _pthread_setschedparam()
54 THR_UNLOCK(curthread); in _pthread_setschedparam()
58 ret = _thr_set_sched_other_prio(curthread, in _pthread_setschedparam()
61 ret = _thr_setscheduler(curthread->tid, policy, param); in _pthread_setschedparam()
66 curthread->attr.sched_policy = policy; in _pthread_setschedparam()
67 curthread->attr.prio = param->sched_priority; in _pthread_setschedparam()
[all …]
HDthr_join.c43 pthread_t curthread = tls_get_curthread(); in backout_join() local
46 THREAD_LIST_LOCK(curthread); in backout_join()
48 THREAD_LIST_UNLOCK(curthread); in backout_join()
72 pthread_t curthread = tls_get_curthread(); in join_common() local
82 if (pthread == curthread) in join_common()
85 THREAD_LIST_LOCK(curthread); in join_common()
86 if ((ret = _thr_find_thread(curthread, pthread, 1)) != 0) { in join_common()
95 THREAD_LIST_UNLOCK(curthread); in join_common()
99 pthread->joiner = curthread; in join_common()
101 THREAD_LIST_UNLOCK(curthread); in join_common()
[all …]
HDthr_resume_np.c46 pthread_t curthread = tls_get_curthread(); in _pthread_resume_np() local
50 if ((ret = _thr_ref_add(curthread, thread, /*include dead*/0)) == 0) { in _pthread_resume_np()
52 THR_THREAD_LOCK(curthread, thread); in _pthread_resume_np()
54 THR_THREAD_UNLOCK(curthread, thread); in _pthread_resume_np()
55 _thr_ref_delete(curthread, thread); in _pthread_resume_np()
63 pthread_t curthread = tls_get_curthread(); in _pthread_resume_all_np() local
67 THREAD_LIST_LOCK(curthread); in _pthread_resume_all_np()
70 if (thread != curthread) { in _pthread_resume_all_np()
71 THR_THREAD_LOCK(curthread, thread); in _pthread_resume_all_np()
73 THR_THREAD_UNLOCK(curthread, thread); in _pthread_resume_all_np()
[all …]
HDthr_info.c47 pthread_t curthread = tls_get_curthread(); in _pthread_setname_np() local
52 if (curthread == thread) { in _pthread_setname_np()
56 if ((error = _thr_ref_add(curthread, thread, 0)) == 0) { in _pthread_setname_np()
57 THR_THREAD_LOCK(curthread, thread); in _pthread_setname_np()
62 THR_THREAD_UNLOCK(curthread, thread); in _pthread_setname_np()
63 _thr_ref_delete(curthread, thread); in _pthread_setname_np()
81 pthread_t curthread = tls_get_curthread(); in _pthread_getname_np() local
86 if (curthread == thread) { in _pthread_getname_np()
90 if ((error = _thr_ref_add(curthread, thread, 0)) == 0) { in _pthread_getname_np()
91 THR_THREAD_LOCK(curthread, thread); in _pthread_getname_np()
[all …]
HDthr_affinity.c44 pthread_t curthread = tls_get_curthread(); in _pthread_getaffinity_np() local
48 if (curthread == thread) { in _pthread_getaffinity_np()
54 if (_thr_ref_add(curthread, thread, 0) == 0) { in _pthread_getaffinity_np()
55 THR_THREAD_LOCK(curthread, thread); in _pthread_getaffinity_np()
61 THR_THREAD_UNLOCK(curthread, thread); in _pthread_getaffinity_np()
62 _thr_ref_delete(curthread, thread); in _pthread_getaffinity_np()
82 pthread_t curthread = tls_get_curthread(); in _pthread_setaffinity_np() local
92 if (curthread == thread) { in _pthread_setaffinity_np()
98 if (_thr_ref_add(curthread, thread, 0) == 0) { in _pthread_setaffinity_np()
99 THR_THREAD_LOCK(curthread, thread); in _pthread_setaffinity_np()
[all …]
HDthr_getschedparam.c46 pthread_t curthread = tls_get_curthread(); in _pthread_getschedparam() local
52 if (pthread == curthread) { in _pthread_getschedparam()
57 THR_LOCK(curthread); in _pthread_getschedparam()
58 *policy = curthread->attr.sched_policy; in _pthread_getschedparam()
59 param->sched_priority = curthread->attr.prio; in _pthread_getschedparam()
60 THR_UNLOCK(curthread); in _pthread_getschedparam()
63 else if ((ret = _thr_ref_add(curthread, pthread, /*include dead*/0)) in _pthread_getschedparam()
65 THR_THREAD_LOCK(curthread, pthread); in _pthread_getschedparam()
68 THR_THREAD_UNLOCK(curthread, pthread); in _pthread_getschedparam()
69 _thr_ref_delete(curthread, pthread); in _pthread_getschedparam()
HDthr_cond.c157 pthread_t curthread = tls_get_curthread(); in _pthread_cond_destroy() local
166 THR_LOCK_ACQUIRE(curthread, &(*cond)->c_lock); in _pthread_cond_destroy()
168 THR_LOCK_RELEASE(curthread, &(*cond)->c_lock); in _pthread_cond_destroy()
180 THR_LOCK_RELEASE(curthread, &cv->c_lock); in _pthread_cond_destroy()
206 pthread_t curthread = tls_get_curthread(); in cond_cancel_handler() local
211 THR_LOCK_ACQUIRE(curthread, &cv->c_lock); in cond_cancel_handler()
220 THR_LOCK_RELEASE(curthread, &cv->c_lock); in cond_cancel_handler()
234 pthread_t curthread = tls_get_curthread(); in cond_wait_common() local
248 (ret = init_static(curthread, cond)) != 0)) { in cond_wait_common()
254 THR_LOCK_ACQUIRE(curthread, &cv->c_lock); in cond_wait_common()
[all …]
HDthr_spinlock.c65 pthread_t curthread = tls_get_curthread(); in _spinunlock() local
67 THR_UMTX_UNLOCK(curthread, (volatile umtx_t *)&lck->access_lock); in _spinunlock()
73 pthread_t curthread; in _spinlock() local
82 curthread = tls_get_curthread(); in _spinlock()
83 THR_UMTX_LOCK(curthread, (volatile umtx_t *)&lck->access_lock); in _spinlock()
92 pthread_t curthread; in _spintrylock() local
101 curthread = tls_get_curthread(); in _spintrylock()
102 return(THR_UMTX_TRYLOCK(curthread, in _spintrylock()
116 pthread_t curthread = tls_get_curthread(); in init_spinlock() local
118 THR_UMTX_LOCK(curthread, &spinlock_static_lock); in init_spinlock()
[all …]
HDthr_kern.c69 _thr_signal_block(pthread_t curthread) in _thr_signal_block() argument
73 if (curthread->sigblock > 0) { in _thr_signal_block()
74 curthread->sigblock++; in _thr_signal_block()
83 __sys_sigprocmask(SIG_BLOCK, &set, &curthread->sigmask); in _thr_signal_block()
84 curthread->sigblock++; in _thr_signal_block()
88 _thr_signal_unblock(pthread_t curthread) in _thr_signal_unblock() argument
90 if (--curthread->sigblock == 0) in _thr_signal_unblock()
91 __sys_sigprocmask(SIG_SETMASK, &curthread->sigmask, NULL); in _thr_signal_unblock()
198 pthread_t curthread = tls_get_curthread(); in _thr_getscheduler() local
202 if (lwpid == curthread->tid) in _thr_getscheduler()
[all …]
HDthr_rwlock.c184 pthread_t curthread = tls_get_curthread(); in rwlock_rdlock_common() local
195 if ((ret = init_static(curthread, rwlock)) != 0) in rwlock_rdlock_common()
215 curthread = tls_get_curthread(); in rwlock_rdlock_common()
216 if ((curthread->rdlock_count > 0) && (prwlock->state > 0)) { in rwlock_rdlock_common()
257 curthread->rdlock_count++; in rwlock_rdlock_common()
288 pthread_t curthread = tls_get_curthread(); in _pthread_rwlock_tryrdlock() local
299 if ((ret = init_static(curthread, rwlock)) != 0) in _pthread_rwlock_tryrdlock()
309 curthread = tls_get_curthread(); in _pthread_rwlock_tryrdlock()
312 else if ((curthread->rdlock_count > 0) && (prwlock->state > 0)) { in _pthread_rwlock_tryrdlock()
314 curthread->rdlock_count++; in _pthread_rwlock_tryrdlock()
[all …]
HDthr_detach.c39 pthread_t curthread = tls_get_curthread(); in _pthread_detach() local
45 THREAD_LIST_LOCK(curthread); in _pthread_detach()
46 if ((rval = _thr_find_thread(curthread, pthread, in _pthread_detach()
48 THREAD_LIST_UNLOCK(curthread); in _pthread_detach()
55 THREAD_LIST_UNLOCK(curthread); in _pthread_detach()
63 THREAD_LIST_UNLOCK(curthread); in _pthread_detach()
/dragonfly/sys/platform/pc64/x86_64/
HDuwrapper.c11 return curthread->td_proc->p_vmspace->vm_pmap.copyinstr(udaddr, kaddr, len, res); in copyinstr()
17 return curthread->td_proc->p_vmspace->vm_pmap.copyin(udaddr, kaddr, len); in copyin()
23 return curthread->td_proc->p_vmspace->vm_pmap.copyout(kaddr, udaddr, len); in copyout()
30 return curthread->td_proc->p_vmspace->vm_pmap.fubyte(base); in fubyte()
36 return curthread->td_proc->p_vmspace->vm_pmap.subyte(base, byte); in subyte()
42 return curthread->td_proc->p_vmspace->vm_pmap.fuword32(base); in fuword32()
48 return curthread->td_proc->p_vmspace->vm_pmap.fuword64(base); in fuword64()
54 return curthread->td_proc->p_vmspace->vm_pmap.suword64(base, word); in suword64()
60 return curthread->td_proc->p_vmspace->vm_pmap.suword32(base, word); in suword32()
66 return curthread->td_proc->p_vmspace->vm_pmap.swapu32(base, v); in swapu32()
[all …]
HDsupport.s200 movq PCPU(curthread),%rcx
211 movq PCPU(curthread),%rcx
230 movq PCPU(curthread),%rax
266 movq PCPU(curthread),%rdx
274 movq PCPU(curthread),%rdx
292 movq PCPU(curthread),%rax
315 movq PCPU(curthread),%rdx
323 movq PCPU(curthread),%rdx
336 movq PCPU(curthread),%rcx
355 movq PCPU(curthread),%rcx
[all …]
/dragonfly/lib/libc/stdio/
HD_flock_stub.c52 pthread_t curthread = _pthread_self(); in _flockfile() local
54 if (fp->_fl_owner == curthread) in _flockfile()
62 fp->_fl_owner = curthread; in _flockfile()
79 pthread_t curthread = _pthread_self(); in _ftrylockfile() local
82 if (fp->_fl_owner == curthread) in _ftrylockfile()
89 fp->_fl_owner = curthread; in _ftrylockfile()
100 pthread_t curthread = _pthread_self(); in _funlockfile() local
105 if (fp->_fl_owner == curthread) { in _funlockfile()

12345678910>>...15