Home
last modified time | relevance | path

Searched refs:thread (Results 1 – 25 of 2077) sorted by relevance

12345678910>>...84

/src/sys/sys/
H A Dsyscallsubr.h86 int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg,
88 int kern_abort2(struct thread *td, const char *why, int nargs,
90 int kern_accept(struct thread *td, int s, struct sockaddr *sa,
92 int kern_accept4(struct thread *td, int s, struct sockaddr *sa,
94 int kern_accessat(struct thread *td, int fd, const char *path,
96 int kern_adjtime(struct thread *td, struct timeval *delta,
98 int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa);
99 int kern_break(struct thread *td, uintptr_t *addr);
100 int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds,
102 int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights);
[all …]
H A Dsched.h75 struct thread;
93 void sched_exit(struct proc *p, struct thread *childtd);
94 void sched_fork(struct thread *td, struct thread *childtd);
95 void sched_fork_exit(struct thread *td);
96 void sched_class(struct thread *td, int class);
104 void sched_exit_thread(struct thread *td, struct thread *child);
105 u_int sched_estcpu(struct thread *td);
106 void sched_fork_thread(struct thread *td, struct thread *child);
107 void sched_ithread_prio(struct thread *td, u_char prio);
108 void sched_lend_prio(struct thread *td, u_char prio);
[all …]
H A Dsysproto.h23 struct thread;
1935 int sys__exit(struct thread *, struct _exit_args *);
1936 int sys_fork(struct thread *, struct fork_args *);
1937 int sys_read(struct thread *, struct read_args *);
1938 int sys_write(struct thread *, struct write_args *);
1939 int sys_open(struct thread *, struct open_args *);
1940 int sys_close(struct thread *, struct close_args *);
1941 int sys_wait4(struct thread *, struct wait4_args *);
1942 int sys_link(struct thread *, struct link_args *);
1943 int sys_unlink(struct thread *, struct unlink_args *);
[all …]
H A Dreg.h47 typedef bool (regset_get)(struct regset *, struct thread *, void *,
49 typedef bool (regset_set)(struct regset *, struct thread *, void *, size_t);
67 int fill_regs(struct thread *, struct reg *);
68 int set_regs(struct thread *, struct reg *);
69 int fill_fpregs(struct thread *, struct fpreg *);
70 int set_fpregs(struct thread *, struct fpreg *);
71 int fill_dbregs(struct thread *, struct dbreg *);
72 int set_dbregs(struct thread *, struct dbreg *);
74 int fill_regs32(struct thread *, struct reg32 *);
75 int set_regs32(struct thread *, struct reg32 *);
[all …]
H A Dproc.h194 struct thread;
234 struct thread { struct
237 TAILQ_ENTRY(thread) td_plist; /* (*) All threads in this proc. */ argument
238 TAILQ_ENTRY(thread) td_runq; /* (t) Run queue. */
240 TAILQ_ENTRY(thread) td_slpq; /* (t) Sleep queue. */ argument
241 struct thread *td_zombie; /* Zombie list linkage */
243 TAILQ_ENTRY(thread) td_lockq; /* (t) Lock queue. */
244 LIST_ENTRY(thread) td_hash; /* (d) Hash chain. */
398 struct thread t0st_thread; argument
402 struct mtx *thread_lock_block(struct thread *);
[all …]
H A Dfile.h51 struct thread;
108 struct thread *td);
110 struct ucred *active_cred, struct thread *td);
112 struct ucred *active_cred, struct thread *td);
114 struct ucred *active_cred, struct thread *td);
118 typedef int fo_close_t(struct file *fp, struct thread *td);
119 typedef void fo_fdclose_t(struct file *fp, int fd, struct thread *td);
121 struct ucred *active_cred, struct thread *td);
123 struct ucred *active_cred, struct thread *td);
126 off_t *sent, int flags, struct thread *td);
[all …]
H A Dptrace.h225 int ptrace_set_pc(struct thread *_td, unsigned long _addr);
226 int ptrace_single_step(struct thread *_td);
227 int ptrace_clear_single_step(struct thread *_td);
230 int cpu_ptrace(struct thread *_td, int _req, void *_addr, int _data);
243 int proc_read_regs(struct thread *_td, struct reg *_reg);
244 int proc_write_regs(struct thread *_td, struct reg *_reg);
245 int proc_read_fpregs(struct thread *_td, struct fpreg *_fpreg);
246 int proc_write_fpregs(struct thread *_td, struct fpreg *_fpreg);
247 int proc_read_dbregs(struct thread *_td, struct dbreg *_dbreg);
248 int proc_write_dbregs(struct thread *_td, struct dbreg *_dbreg);
[all …]
/src/lib/libthr/thread/
H A Dthr_list.c75 static void thr_destroy(struct pthread *curthread, struct pthread *thread);
135 struct pthread *thread = NULL; in _thr_alloc() local
143 if ((thread = TAILQ_FIRST(&free_threadq)) != NULL) { in _thr_alloc()
144 TAILQ_REMOVE(&free_threadq, thread, tle); in _thr_alloc()
150 if (thread == NULL) { in _thr_alloc()
154 thread = __thr_aligned_alloc_offset(_Alignof(struct pthread), in _thr_alloc()
156 if (thread == NULL) { in _thr_alloc()
160 memset(thread, 0, sizeof(*thread)); in _thr_alloc()
161 if ((thread->sleepqueue = _sleepq_alloc()) == NULL || in _thr_alloc()
162 (thread->wake_addr = _thr_alloc_wake_addr()) == NULL) { in _thr_alloc()
[all …]
H A Dthr_suspend_np.c49 _pthread_suspend_np(pthread_t thread) in _pthread_suspend_np() argument
55 if (thread == _get_curthread()) in _pthread_suspend_np()
59 else if ((ret = _thr_ref_add(curthread, thread, /*include dead*/0)) in _pthread_suspend_np()
62 THR_THREAD_LOCK(curthread, thread); in _pthread_suspend_np()
63 suspend_common(curthread, thread, 1); in _pthread_suspend_np()
65 THR_THREAD_UNLOCK(curthread, thread); in _pthread_suspend_np()
68 _thr_ref_delete(curthread, thread); in _pthread_suspend_np()
108 struct pthread *thread; in _thr_suspend_all_np() local
116 TAILQ_FOREACH(thread, &_thread_list, tle) { in _thr_suspend_all_np()
117 if (thread != curthread) { in _thr_suspend_all_np()
[all …]
H A Dthr_info.c47 thr_set_name_np(struct pthread *thread, char **tmp_name) in thr_set_name_np() argument
50 free(thread->name); in thr_set_name_np()
51 thread->name = *tmp_name; in thr_set_name_np()
58 _pthread_setname_np(pthread_t thread, const char *name) in _pthread_setname_np() argument
72 if (curthread == thread) { in _pthread_setname_np()
74 THR_THREAD_LOCK(curthread, thread); in _pthread_setname_np()
75 if (thr_set_name(thread->tid, name) == -1) in _pthread_setname_np()
78 thr_set_name_np(thread, &tmp_name); 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()
[all …]
H A Dthr_resume_np.c44 static void resume_common(struct pthread *thread);
48 _pthread_resume_np(pthread_t thread) in _pthread_resume_np() argument
54 if ((ret = _thr_find_thread(curthread, thread, /*include dead*/0)) == 0) { in _pthread_resume_np()
56 resume_common(thread); in _pthread_resume_np()
57 THR_THREAD_UNLOCK(curthread, thread); in _pthread_resume_np()
66 struct pthread *thread; in _thr_resume_all_np() local
75 TAILQ_FOREACH(thread, &_thread_list, tle) { in _thr_resume_all_np()
76 if (thread != curthread) { in _thr_resume_all_np()
77 THR_THREAD_LOCK(curthread, thread); in _thr_resume_all_np()
78 resume_common(thread); in _thr_resume_all_np()
[all …]
/src/contrib/llvm-project/llvm/include/llvm/Support/
H A Dthread.h38 class thread {
72 thread() : Thread(native_handle_type()) {} in thread() function
73 thread(thread &&Other) noexcept in thread() function
77 explicit thread(Function &&f, Args &&...args) in thread() function
78 : thread(DefaultStackSize, f, args...) {} in thread()
81 explicit thread(std::optional<unsigned> StackSizeInBytes, Function &&f,
83 thread(const thread &) = delete;
85 ~thread() { in ~thread()
90 thread &operator=(thread &&Other) noexcept {
104 return std::thread::hardware_concurrency(); in hardware_concurrency()
[all …]
/src/contrib/llvm-project/libcxx/include/
H A Dthread15 thread synopsis
20 class thread
26 thread() noexcept;
27 template <class F, class ...Args> explicit thread(F&& f, Args&&... args);
28 ~thread();
30 thread(const thread&) = delete;
31 thread(thread&& t) noexcept;
33 thread& operator=(const thread&) = delete;
34 thread& operator=(thread&& t) noexcept;
36 void swap(thread& t) noexcept;
[all …]
/src/crypto/openssl/crypto/thread/
H A Darch.c47 int ossl_crypto_thread_native_join(CRYPTO_THREAD *thread, CRYPTO_THREAD_RETVAL *retval) in ossl_crypto_thread_native_join() argument
51 if (thread == NULL) in ossl_crypto_thread_native_join()
54 ossl_crypto_mutex_lock(thread->statelock); in ossl_crypto_thread_native_join()
56 while (!CRYPTO_THREAD_GET_STATE(thread, req_state_mask)) in ossl_crypto_thread_native_join()
57 ossl_crypto_condvar_wait(thread->condvar, thread->statelock); in ossl_crypto_thread_native_join()
59 if (CRYPTO_THREAD_GET_STATE(thread, CRYPTO_THREAD_JOINED)) in ossl_crypto_thread_native_join()
63 while (CRYPTO_THREAD_GET_STATE(thread, CRYPTO_THREAD_JOIN_AWAIT)) { in ossl_crypto_thread_native_join()
64 if (!CRYPTO_THREAD_GET_STATE(thread, CRYPTO_THREAD_JOINED)) in ossl_crypto_thread_native_join()
65 ossl_crypto_condvar_wait(thread->condvar, thread->statelock); in ossl_crypto_thread_native_join()
66 if (CRYPTO_THREAD_GET_STATE(thread, CRYPTO_THREAD_JOINED)) in ossl_crypto_thread_native_join()
[all …]
/src/sys/i386/linux/
H A Dlinux_proto.h23 struct thread;
1735 int linux_exit(struct thread *, struct linux_exit_args *);
1736 int linux_fork(struct thread *, struct linux_fork_args *);
1737 int linux_write(struct thread *, struct linux_write_args *);
1738 int linux_open(struct thread *, struct linux_open_args *);
1739 int linux_waitpid(struct thread *, struct linux_waitpid_args *);
1740 int linux_creat(struct thread *, struct linux_creat_args *);
1741 int linux_link(struct thread *, struct linux_link_args *);
1742 int linux_unlink(struct thread *, struct linux_unlink_args *);
1743 int linux_execve(struct thread *, struct linux_execve_args *);
[all …]
/src/sys/contrib/ck/src/
H A Dck_hp.c221 ck_hp_reclaim(struct ck_hp_record *thread) in ck_hp_reclaim() argument
224 struct ck_hp *global = thread->global; in ck_hp_reclaim()
230 cache = thread->cache; in ck_hp_reclaim()
239 CK_STACK_FOREACH_SAFE(&thread->pending, entry, next) { in ck_hp_reclaim()
254 thread->n_pending -= 1; in ck_hp_reclaim()
260 CK_STACK_FIRST(&thread->pending) = CK_STACK_NEXT(entry); in ck_hp_reclaim()
264 thread->n_reclamations++; in ck_hp_reclaim()
271 ck_hp_retire(struct ck_hp_record *thread, in ck_hp_retire() argument
279 ck_stack_push_spnc(&thread->pending, &hazard->pending_entry); in ck_hp_retire()
281 thread->n_pending += 1; in ck_hp_retire()
[all …]
/src/sys/amd64/linux32/
H A Dlinux32_proto.h23 struct thread;
1741 int linux_exit(struct thread *, struct linux_exit_args *);
1742 int linux_fork(struct thread *, struct linux_fork_args *);
1743 int linux_write(struct thread *, struct linux_write_args *);
1744 int linux_open(struct thread *, struct linux_open_args *);
1745 int linux_waitpid(struct thread *, struct linux_waitpid_args *);
1746 int linux_creat(struct thread *, struct linux_creat_args *);
1747 int linux_link(struct thread *, struct linux_link_args *);
1748 int linux_unlink(struct thread *, struct linux_unlink_args *);
1749 int linux_execve(struct thread *, struct linux_execve_args *);
[all …]
/src/sys/amd64/linux/
H A Dlinux_proto.h23 struct thread;
1443 int linux_write(struct thread *, struct linux_write_args *);
1444 int linux_open(struct thread *, struct linux_open_args *);
1445 int linux_newstat(struct thread *, struct linux_newstat_args *);
1446 int linux_newfstat(struct thread *, struct linux_newfstat_args *);
1447 int linux_newlstat(struct thread *, struct linux_newlstat_args *);
1448 int linux_poll(struct thread *, struct linux_poll_args *);
1449 int linux_lseek(struct thread *, struct linux_lseek_args *);
1450 int linux_mmap2(struct thread *, struct linux_mmap2_args *);
1451 int linux_mprotect(struct thread *, struct linux_mprotect_args *);
[all …]
/src/sys/kern/
H A Dsched_shim.c41 struct thread *, childtd)
42 DEFINE_SHIM2(fork, void, sched_fork, struct thread *, td,
43 struct thread *, childtd)
44 DEFINE_SHIM1(fork_exit, void, sched_fork_exit, struct thread *, td)
45 DEFINE_SHIM2(class, void, sched_class, struct thread *, td, int, class)
48 DEFINE_SHIM2(exit_thread, void, sched_exit_thread, struct thread *, td,
49 struct thread *, child)
50 DEFINE_SHIM1(estcpu, u_int, sched_estcpu, struct thread *, td)
51 DEFINE_SHIM2(fork_thread, void, sched_fork_thread, struct thread *, td,
52 struct thread *, child)
[all …]
/src/sys/arm64/include/
H A Dvfp.h69 struct thread;
74 void vfp_discard(struct thread *);
77 void vfp_new_thread(struct thread *, struct thread *, bool);
78 void vfp_reset_state(struct thread *, struct pcb *);
80 void vfp_save_state(struct thread *, struct pcb *);
82 void vfp_save_state_switch(struct thread *);
83 void vfp_to_sve_sync(struct thread *);
84 void sve_to_vfp_sync(struct thread *);
87 size_t sve_buf_size(struct thread *);
88 bool sve_restore_state(struct thread *);
[all …]
/src/sys/arm64/linux/
H A Dlinux_proto.h23 struct thread;
1250 int linux_setxattr(struct thread *, struct linux_setxattr_args *);
1251 int linux_lsetxattr(struct thread *, struct linux_lsetxattr_args *);
1252 int linux_fsetxattr(struct thread *, struct linux_fsetxattr_args *);
1253 int linux_getxattr(struct thread *, struct linux_getxattr_args *);
1254 int linux_lgetxattr(struct thread *, struct linux_lgetxattr_args *);
1255 int linux_fgetxattr(struct thread *, struct linux_fgetxattr_args *);
1256 int linux_listxattr(struct thread *, struct linux_listxattr_args *);
1257 int linux_llistxattr(struct thread *, struct linux_llistxattr_args *);
1258 int linux_flistxattr(struct thread *, struct linux_flistxattr_args *);
[all …]
/src/sys/contrib/zstd/lib/common/
H A Dthreading.c40 ZSTD_pthread_t* const thread = (ZSTD_pthread_t*) arg; in worker() local
41 thread->arg = thread->start_routine(thread->arg); in worker()
45 int ZSTD_pthread_create(ZSTD_pthread_t* thread, const void* unused, in ZSTD_pthread_create() argument
49 thread->arg = arg; in ZSTD_pthread_create()
50 thread->start_routine = start_routine; in ZSTD_pthread_create()
51 thread->handle = (HANDLE) _beginthreadex(NULL, 0, worker, thread, 0, NULL); in ZSTD_pthread_create()
53 if (!thread->handle) in ZSTD_pthread_create()
59 int ZSTD_pthread_join(ZSTD_pthread_t thread, void **value_ptr) in ZSTD_pthread_join() argument
63 if (!thread.handle) return 0; in ZSTD_pthread_join()
65 result = WaitForSingleObject(thread.handle, INFINITE); in ZSTD_pthread_join()
[all …]
/src/contrib/llvm-project/openmp/runtime/src/
H A Dkmp_taskdeps.h21 static inline void __kmp_node_deref(kmp_info_t *thread, kmp_depnode_t *node) { in __kmp_node_deref() argument
33 __kmp_fast_free(thread, node); in __kmp_node_deref()
35 __kmp_thread_free(thread, node); in __kmp_node_deref()
40 static inline void __kmp_depnode_list_free(kmp_info_t *thread, in __kmp_depnode_list_free() argument
47 __kmp_node_deref(thread, list->node); in __kmp_depnode_list_free()
49 __kmp_fast_free(thread, list); in __kmp_depnode_list_free()
51 __kmp_thread_free(thread, list); in __kmp_depnode_list_free()
56 static inline void __kmp_dephash_free_entries(kmp_info_t *thread, in __kmp_dephash_free_entries() argument
63 __kmp_depnode_list_free(thread, entry->last_set); in __kmp_dephash_free_entries()
64 __kmp_depnode_list_free(thread, entry->prev_set); in __kmp_dephash_free_entries()
[all …]
/src/crypto/openssl/crypto/thread/arch/
H A Dthread_posix.c20 CRYPTO_THREAD *thread; in thread_start_thunk() local
23 thread = (CRYPTO_THREAD *)vthread; in thread_start_thunk()
25 ret = thread->routine(thread->data); in thread_start_thunk()
26 ossl_crypto_mutex_lock(thread->statelock); in thread_start_thunk()
27 CRYPTO_THREAD_SET_STATE(thread, CRYPTO_THREAD_FINISHED); in thread_start_thunk()
28 thread->retval = ret; in thread_start_thunk()
29 ossl_crypto_condvar_broadcast(thread->condvar); in thread_start_thunk()
30 ossl_crypto_mutex_unlock(thread->statelock); in thread_start_thunk()
35 int ossl_crypto_thread_native_spawn(CRYPTO_THREAD *thread) in ossl_crypto_thread_native_spawn() argument
46 if (!thread->joinable) in ossl_crypto_thread_native_spawn()
[all …]
/src/sys/fs/nfsserver/
H A Dnfs_fha_new.c418 fha_hash_entry_add_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) in fha_hash_entry_add_thread() argument
422 thread->st_p2 = 0; in fha_hash_entry_add_thread()
423 LIST_INSERT_HEAD(&fhe->threads, thread, st_alink); in fha_hash_entry_add_thread()
428 fha_hash_entry_remove_thread(struct fha_hash_entry *fhe, SVCTHREAD *thread) in fha_hash_entry_remove_thread() argument
432 KASSERT(thread->st_p2 == 0, in fha_hash_entry_remove_thread()
433 ("%d reqs on removed thread %p", thread->st_p2, thread)); in fha_hash_entry_remove_thread()
434 LIST_REMOVE(thread, st_alink); in fha_hash_entry_remove_thread()
460 SVCTHREAD *thread, *min_thread = NULL; in fha_hash_entry_choose_thread() local
464 LIST_FOREACH(thread, &fhe->threads, st_alink) { in fha_hash_entry_choose_thread()
465 req_count = thread->st_p2; in fha_hash_entry_choose_thread()
[all …]

12345678910>>...84