Home
last modified time | relevance | path

Searched refs:pthread (Results 1 – 25 of 323) sorted by relevance

12345678910>>...13

/freebsd/lib/libthr/thread/
H A Dthr_join.c36 int _pthread_peekjoin_np(pthread_t pthread, void **thread_return);
37 int _pthread_tryjoin_np(pthread_t pthread, void **thread_return);
38 int _pthread_timedjoin_np(pthread_t pthread, void **thread_return,
50 backout_join(struct pthread *pthread, struct pthread *curthread) in backout_join() argument
52 THR_THREAD_LOCK(curthread, pthread); in backout_join()
53 pthread->joiner = NULL; in backout_join()
54 THR_THREAD_UNLOCK(curthread, pthread); in backout_join()
60 struct pthread *pthread = (struct pthread *)arg; in backout_join_pop() local
61 struct pthread *curthread = _get_curthread(); in backout_join_pop()
63 backout_join(pthread, curthread); in backout_join_pop()
[all …]
H A Dthr_list.c63 static TAILQ_HEAD(, pthread) free_threadq;
70 LIST_HEAD(thread_hash_head, pthread);
75 static void thr_destroy(struct pthread *curthread, struct pthread *thread);
97 _thr_gc(struct pthread *curthread) in _thr_gc()
99 struct pthread *td, *td_next; in _thr_gc()
100 TAILQ_HEAD(, pthread) worklist; in _thr_gc()
132 struct pthread *
133 _thr_alloc(struct pthread *curthread) in _thr_alloc()
135 struct pthread *thread = NULL; in _thr_alloc()
154 thread = __thr_aligned_alloc_offset(_Alignof(struct pthread), in _thr_alloc()
[all …]
H A Dthr_private.h72 struct pthread;
73 extern struct pthread *_thr_initial __hidden;
84 typedef TAILQ_HEAD(pthreadlist, pthread) pthreadlist;
284 TAILQ_HEAD(, pthread) sq_blocked;
369 struct pthread { struct
399 TAILQ_ENTRY(pthread) tle; /* link for all threads in process */ argument
402 TAILQ_ENTRY(pthread) gcle;
405 LIST_ENTRY(pthread) hle;
408 TAILQ_ENTRY(pthread) wle;
480 struct pthread *joiner; argument
[all …]
H A Dthr_cancel.c47 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 Dthr_setschedparam.c50 _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 Dthr_spec.c59 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 Dthr_setprio.c41 _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, &param); in _pthread_setprio()
62 pthread->attr.prio = prio; in _pthread_setprio()
[all …]
H A Dthr_syscalls.c100 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 Dthr_detach.c42 _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 Dthr_symbols.c42 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 Dthr_kill.c44 _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 Dthr_getschedparam.c47 _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 Dthr_malloc.c57 thr_malloc_lock(struct pthread *curthread) in thr_malloc_lock()
72 thr_malloc_unlock(struct pthread *curthread) in thr_malloc_unlock()
88 struct pthread *curthread; in __thr_calloc()
101 struct pthread *curthread; in __thr_free()
112 struct pthread *curthread; in __thr_malloc()
125 struct pthread *curthread; in __thr_aligned_alloc_offset()
138 struct pthread *curthread; in __thr_realloc()
149 __thr_malloc_prefork(struct pthread *curthread) in __thr_malloc_prefork()
156 __thr_malloc_postfork(struct pthread *curthread) in __thr_malloc_postfork()
H A Dthr_suspend_np.c40 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 Dthr_sig.c70 static void check_deferred_signal(struct pthread *);
71 static void check_suspend(struct pthread *);
72 static void check_cancel(struct pthread *curthread, ucontext_t *ucp);
95 thr_signal_block_slow(struct pthread *curthread) in thr_signal_block_slow()
106 thr_signal_unblock_slow(struct pthread *curthread) in thr_signal_unblock_slow()
113 thr_signal_block_fast(struct pthread *curthread) in thr_signal_block_fast()
119 thr_signal_unblock_fast(struct pthread *curthread) in thr_signal_unblock_fast()
131 _thr_signal_block(struct pthread *curthread) in _thr_signal_block()
140 _thr_signal_unblock(struct pthread *curthread) in _thr_signal_unblock()
160 _thr_signal_block_setup(struct pthread *curthread) in _thr_signal_block_setup()
[all …]
H A Dthr_rtld.c54 struct pthread *wowner;
57 sizeof(struct pthread *) - sizeof(u_int)];
114 struct pthread *curthread; in _thr_rtld_rlock_acquire()
136 struct pthread *curthread; in _thr_rtld_wlock_acquire()
154 struct pthread *curthread; in _thr_rtld_lock_release()
217 struct pthread *curthread; in _thr_dlerror_loc()
226 struct pthread *curthread; in _thr_dlerror_seen()
236 struct pthread *curthread; in _thr_rtld_init()
H A Dthr_resume_np.c44 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 Dthr_pshared.c67 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()
/freebsd/tests/sys/kern/
H A DMakefile90 LIBADD.ssl_sendfile+= pthread crypto ssl
94 LIBADD.sys_getrandom+= pthread
95 LIBADD.ptrace_test+= pthread
96 LIBADD.unix_seqpacket_test+= pthread
98 LIBADD.kcov+= pthread
101 LIBADD.listener_wakeup+= pthread
102 LIBADD.shutdown_dgram+= pthread
103 LIBADD.socket_msg_waitall+= pthread
104 LIBADD.socket_splice+= pthread
105 LIBADD.sendfile_helper+= pthread
[all …]
/freebsd/sys/contrib/libsodium/m4/
H A Dax_pthread.m436 # 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 Dax_pthread.m440 # 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/crypto/krb5/src/config/ac-archive/
H A Dax_pthread.m440 # 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 Dacx_pthread.m492 # 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 Dacx_pthread.m492 # 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 Dsrc.libnames.mk210 pthread \
324 _DP_zstd= pthread
326 _DP_blacklist+= pthread
329 _DP_blocklist+= pthread
331 _DP_crypto= pthread
340 _DP_sqlite3= pthread
341 _DP_ssl= pthread crypto
366 _DP_usb= pthread
367 _DP_unbound= ssl crypto pthread
368 _DP_rt= pthread
[all …]

12345678910>>...13