/freebsd/lib/libthr/thread/ |
H A D | thr_join.c | 36 int _pthread_peekjoin_np(pthread_t pthread, void **thread_return); 37 int _pthread_timedjoin_np(pthread_t pthread, void **thread_return, 48 struct pthread *pthread = (struct pthread *)arg; in backout_join() local 49 struct pthread *curthread = _get_curthread(); in backout_join() 51 THR_THREAD_LOCK(curthread, pthread); in backout_join() 52 pthread->joiner = NULL; in backout_join() 53 THR_THREAD_UNLOCK(curthread, pthread); in backout_join() 57 _thr_join(pthread_t pthread, void **thread_return) in _thr_join() argument 59 return (join_common(pthread, thread_return, NULL, false)); in _thr_join() 63 _pthread_timedjoin_np(pthread_t pthread, void **thread_return, in _pthread_timedjoin_np() argument [all …]
|
H A D | thr_list.c | 62 static TAILQ_HEAD(, pthread) free_threadq; 69 LIST_HEAD(thread_hash_head, pthread); 74 static void thr_destroy(struct pthread *curthread, struct pthread *thread); 96 _thr_gc(struct pthread *curthread) in _thr_gc() 98 struct pthread *td, *td_next; in _thr_gc() 99 TAILQ_HEAD(, pthread) worklist; in _thr_gc() 131 struct pthread * 132 _thr_alloc(struct pthread *curthread) in _thr_alloc() 134 struct pthread *thread = NULL; in _thr_alloc() 153 thread = __thr_calloc(1, sizeof(struct pthread)); in _thr_alloc() [all …]
|
H A D | thr_private.h | 71 struct pthread; 72 extern struct pthread *_thr_initial __hidden; 83 typedef TAILQ_HEAD(pthreadlist, pthread) pthreadlist; 283 TAILQ_HEAD(, pthread) sq_blocked; 368 struct pthread { struct 398 TAILQ_ENTRY(pthread) tle; /* link for all threads in process */ argument 401 TAILQ_ENTRY(pthread) gcle; 404 LIST_ENTRY(pthread) hle; 407 TAILQ_ENTRY(pthread) wle; 479 struct pthread *joiner; argument [all …]
|
H A D | thr_cancel.c | 47 testcancel(struct pthread *curthread) in testcancel() 55 _thr_testcancel(struct pthread *curthread) in _thr_testcancel() 61 _thr_cancel(pthread_t pthread) in _thr_cancel() argument 63 struct pthread *curthread = _get_curthread(); in _thr_cancel() 71 if ((ret = _thr_find_thread(curthread, pthread, 1)) == 0) { in _thr_cancel() 72 if (!pthread->cancel_pending) { in _thr_cancel() 73 pthread->cancel_pending = 1; in _thr_cancel() 74 if (pthread->state != PS_DEAD) in _thr_cancel() 75 _thr_send_sig(pthread, SIGCANCEL); in _thr_cancel() 77 THR_THREAD_UNLOCK(curthread, pthread); in _thr_cancel() [all …]
|
H A D | thr_setschedparam.c | 50 _pthread_setschedparam(pthread_t pthread, int policy, in _pthread_setschedparam() argument 53 struct pthread *curthread = _get_curthread(); in _pthread_setschedparam() 56 if (pthread == curthread) in _pthread_setschedparam() 58 else if ((ret = _thr_find_thread(curthread, pthread, in _pthread_setschedparam() 61 if (pthread->attr.sched_policy == policy && in _pthread_setschedparam() 63 pthread->attr.prio == param->sched_priority)) { in _pthread_setschedparam() 64 pthread->attr.prio = param->sched_priority; in _pthread_setschedparam() 65 THR_THREAD_UNLOCK(curthread, pthread); in _pthread_setschedparam() 68 ret = _thr_setscheduler(pthread->tid, policy, param); in _pthread_setschedparam() 72 pthread->attr.sched_policy = policy; in _pthread_setschedparam() [all …]
|
H A D | thr_spec.c | 59 struct pthread *curthread; in _thr_key_create() 87 struct pthread *curthread; in _thr_key_delete() 108 struct pthread *curthread; in _thread_cleanupspecific() 170 struct pthread *pthread; in _thr_setspecific() local 179 pthread = _get_curthread(); in _thr_setspecific() 180 if (pthread->specific == NULL) { in _thr_setspecific() 185 pthread->specific = tmp; in _thr_setspecific() 187 if (pthread->specific[key].data == NULL) { in _thr_setspecific() 189 pthread->specific_data_count++; in _thr_setspecific() 191 pthread->specific_data_count--; in _thr_setspecific() [all …]
|
H A D | thr_setprio.c | 41 _pthread_setprio(pthread_t pthread, int prio) in _pthread_setprio() argument 43 struct pthread *curthread = _get_curthread(); in _pthread_setprio() 48 if (pthread == curthread) in _pthread_setprio() 50 else if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0))) in _pthread_setprio() 52 if (pthread->attr.sched_policy == SCHED_OTHER || in _pthread_setprio() 53 pthread->attr.prio == prio) { in _pthread_setprio() 54 pthread->attr.prio = prio; in _pthread_setprio() 57 ret = _thr_setscheduler(pthread->tid, in _pthread_setprio() 58 pthread->attr.sched_policy, ¶m); in _pthread_setprio() 62 pthread->attr.prio = prio; in _pthread_setprio() [all …]
|
H A D | thr_detach.c | 42 _thr_detach(pthread_t pthread) in _thr_detach() argument 44 struct pthread *curthread = _get_curthread(); in _thr_detach() 47 if (pthread == NULL) in _thr_detach() 50 if ((rval = _thr_find_thread(curthread, pthread, in _thr_detach() 56 if ((pthread->flags & THR_FLAGS_DETACHED) != 0 || in _thr_detach() 57 (pthread->joiner != NULL)) { in _thr_detach() 58 THR_THREAD_UNLOCK(curthread, pthread); in _thr_detach() 63 pthread->flags |= THR_FLAGS_DETACHED; in _thr_detach() 64 _thr_try_gc(curthread, pthread); /* thread lock released */ in _thr_detach()
|
H A D | thr_syscalls.c | 100 struct pthread *curthread; in __thr_accept() 118 struct pthread *curthread; in __thr_accept4() 133 struct pthread *curthread; in __thr_aio_suspend() 154 struct pthread *curthread; in __thr_close() 172 struct pthread *curthread; in __thr_connect() 193 struct pthread *curthread; in __thr_fcntl() 215 struct pthread *curthread; in __thr_fsync() 229 struct pthread *curthread; in __thr_fdatasync() 247 struct pthread *curthread; in __thr_msync() 262 struct pthread *curthread; in __thr_clock_nanosleep() [all …]
|
H A D | thr_symbols.c | 42 int _thread_off_tcb = offsetof(struct pthread, tcb); 43 int _thread_off_tid = offsetof(struct pthread, tid); 44 int _thread_off_next = offsetof(struct pthread, tle.tqe_next); 45 int _thread_off_attr_flags = offsetof(struct pthread, attr.flags); 48 int _thread_off_report_events = offsetof(struct pthread, report_events); 49 int _thread_off_event_mask = offsetof(struct pthread, event_mask); 50 int _thread_off_event_buf = offsetof(struct pthread, event_buf); 56 int _thread_off_state = offsetof(struct pthread, state);
|
H A D | thr_kill.c | 44 _Tthr_kill(pthread_t pthread, int sig) in _Tthr_kill() argument 46 struct pthread *curthread; in _Tthr_kill() 61 if (curthread == pthread) { in _Tthr_kill() 63 _thr_send_sig(pthread, sig); in _Tthr_kill() 65 } else if ((ret = _thr_find_thread(curthread, pthread, in _Tthr_kill() 68 _thr_send_sig(pthread, sig); in _Tthr_kill() 69 THR_THREAD_UNLOCK(curthread, pthread); in _Tthr_kill()
|
H A D | thr_getschedparam.c | 47 _pthread_getschedparam(pthread_t pthread, int * __restrict policy, in _pthread_getschedparam() argument 50 struct pthread *curthread = _get_curthread(); in _pthread_getschedparam() 60 if (pthread == curthread) in _pthread_getschedparam() 62 else if ((ret = _thr_find_thread(curthread, pthread, /*include dead*/0))) in _pthread_getschedparam() 64 *policy = pthread->attr.sched_policy; in _pthread_getschedparam() 65 param->sched_priority = pthread->attr.prio; in _pthread_getschedparam() 66 THR_THREAD_UNLOCK(curthread, pthread); in _pthread_getschedparam()
|
H A D | thr_suspend_np.c | 40 static int suspend_common(struct pthread *, struct pthread *, 51 struct pthread *curthread = _get_curthread(); in _pthread_suspend_np() 74 _thr_suspend_all_lock(struct pthread *curthread) in _thr_suspend_all_lock() 92 _thr_suspend_all_unlock(struct pthread *curthread) in _thr_suspend_all_unlock() 107 struct pthread *curthread = _get_curthread(); in _thr_suspend_all_np() 108 struct pthread *thread; in _thr_suspend_all_np() 160 suspend_common(struct pthread *curthread, struct pthread *thread, in suspend_common()
|
H A D | thr_sig.c | 69 static void check_deferred_signal(struct pthread *); 70 static void check_suspend(struct pthread *); 71 static void check_cancel(struct pthread *curthread, ucontext_t *ucp); 94 thr_signal_block_slow(struct pthread *curthread) in thr_signal_block_slow() 105 thr_signal_unblock_slow(struct pthread *curthread) in thr_signal_unblock_slow() 112 thr_signal_block_fast(struct pthread *curthread) in thr_signal_block_fast() 118 thr_signal_unblock_fast(struct pthread *curthread) in thr_signal_unblock_fast() 130 _thr_signal_block(struct pthread *curthread) in _thr_signal_block() 139 _thr_signal_unblock(struct pthread *curthread) in _thr_signal_unblock() 159 _thr_signal_block_setup(struct pthread *curthread) in _thr_signal_block_setup() [all …]
|
H A D | thr_resume_np.c | 44 static void resume_common(struct pthread *thread); 50 struct pthread *curthread = _get_curthread(); in _pthread_resume_np() 65 struct pthread *curthread = _get_curthread(); in _thr_resume_all_np() 66 struct pthread *thread; in _thr_resume_all_np() 91 resume_common(struct pthread *thread) in resume_common()
|
H A D | thr_pshared.c | 67 pshared_rlock(struct pthread *curthread) in pshared_rlock() 75 pshared_wlock(struct pthread *curthread) in pshared_wlock() 83 pshared_unlock(struct pthread *curthread) in pshared_unlock() 102 pshared_gc(struct pthread *curthread) in pshared_gc() 214 pshared_destroy(struct pthread *curthread, void *key) in pshared_destroy() 227 struct pthread *curthread; in __thr_pshared_offpage() 263 struct pthread *curthread; in __thr_pshared_destroy()
|
H A D | thr_rtld.c | 111 struct pthread *curthread; in _thr_rtld_rlock_acquire() 129 struct pthread *curthread; in _thr_rtld_wlock_acquire() 146 struct pthread *curthread; in _thr_rtld_lock_release() 201 struct pthread *curthread; in _thr_dlerror_loc() 210 struct pthread *curthread; in _thr_dlerror_seen() 220 struct pthread *curthread; in _thr_rtld_init()
|
H A D | thr_sleepq.c | 80 struct pthread *curthread = _get_curthread(); in _sleepq_lock() 91 struct pthread *curthread = _get_curthread(); in _sleepq_unlock() 115 _sleepq_add(void *wchan, struct pthread *td) in _sleepq_add() 139 _sleepq_remove(struct sleepqueue *sq, struct pthread *td) in _sleepq_remove() 159 void (*cb)(struct pthread *, void *arg), void *arg) in _sleepq_drop() argument 161 struct pthread *td; in _sleepq_drop()
|
H A D | thr_getcpuclockid.c | 40 _pthread_getcpuclockid(pthread_t pthread, clockid_t *clock_id) in _pthread_getcpuclockid() argument 43 if (pthread == NULL) in _pthread_getcpuclockid() 46 if (clock_getcpuclockid2(TID(pthread), CPUCLOCK_WHICH_TID, clock_id)) in _pthread_getcpuclockid()
|
/freebsd/tests/sys/kern/ |
H A D | Makefile | 80 LIBADD.sys_getrandom+= pthread 81 LIBADD.ptrace_test+= pthread 82 LIBADD.unix_seqpacket_test+= pthread 83 LIBADD.kcov+= pthread 86 LIBADD.listener_wakeup+= pthread 87 LIBADD.shutdown_dgram+= pthread 88 LIBADD.socket_msg_waitall+= pthread 89 LIBADD.socket_splice+= pthread 90 LIBADD.sendfile_helper+= pthread 91 LIBADD.fdgrowtable_test+= util pthread kvm procstat
|
/freebsd/sys/contrib/libsodium/m4/ |
H A D | ax_pthread.m4 | 36 # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the 95 # We used to check for pthread.h first, but this fails if pthread.h 128 # which indicates that we try without any flags at all, and "pthread-config" 131 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pth… 139 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) 140 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 149 # pthread: Linux, etcetera 151 # pthread-config: use pthread-config program (for GNU Pth library) 157 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) 158 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) [all …]
|
/freebsd/contrib/unbound/ |
H A D | ax_pthread.m4 | 40 # Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the 100 # We used to check for pthread.h first, but this fails if pthread.h 136 # any flags at all, and "pthread-config" which is a program returning 139 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pth… 147 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) 148 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 157 # pthread: Linux, etcetera 159 # pthread-config: use pthread-config program (for GNU Pth library) 165 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) 166 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) [all …]
|
/freebsd/contrib/ntp/sntp/libevent/m4/ |
H A D | acx_pthread.m4 | 92 # We used to check for pthread.h first, but this fails if pthread.h 122 # which indicates that we try without any flags at all, and "pthread-config" 125 acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" 133 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) 134 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) 135 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) 136 # -pthread [all...] |
/freebsd/contrib/libevent/m4/ |
H A D | acx_pthread.m4 | 92 # We used to check for pthread.h first, but this fails if pthread.h 122 # which indicates that we try without any flags at all, and "pthread-config" 125 …ags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -m… 133 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) 134 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) 135 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) 136 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) 143 # pthread: Linux, etcetera 145 # pthread-config: use pthread-config program (for GNU Pth library) 158 acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" [all …]
|
/freebsd/share/mk/ |
H A D | src.libnames.mk | 194 pthread \ 293 _DP_zstd= pthread 295 _DP_blacklist+= pthread 297 _DP_crypto= pthread 306 _DP_sqlite3= pthread 332 _DP_usb= pthread 333 _DP_unbound= ssl crypto pthread 334 _DP_rt= pthread 364 _DP_cuse= pthread 366 _DP_gtest= pthread regex [all …]
|