/freebsd/sys/sys/ |
H A D | syscallsubr.h | 85 int kern___getcwd(struct thread *td, char *buf, enum uio_seg bufseg, 87 int kern_abort2(struct thread *td, const char *why, int nargs, 89 int kern_accept(struct thread *td, int s, struct sockaddr *sa, 91 int kern_accept4(struct thread *td, int s, struct sockaddr *sa, 93 int kern_accessat(struct thread *td, int fd, const char *path, 95 int kern_adjtime(struct thread *td, struct timeval *delta, 97 int kern_bindat(struct thread *td, int dirfd, int fd, struct sockaddr *sa); 98 int kern_break(struct thread *td, uintptr_t *addr); 99 int kern_cap_ioctls_limit(struct thread *td, int fd, u_long *cmds, 101 int kern_cap_rights_limit(struct thread *td, int fd, cap_rights_t *rights); [all …]
|
H A D | sched.h | 82 void sched_exit(struct proc *p, struct thread *childtd); 83 void sched_fork(struct thread *td, struct thread *childtd); 84 void sched_fork_exit(struct thread *td); 85 void sched_class(struct thread *td, int class); 93 void sched_exit_thread(struct thread *td, struct thread *child); 94 u_int sched_estcpu(struct thread *td); 95 void sched_fork_thread(struct thread *td, struct thread *chil [all...] |
H A D | sysproto.h | 23 struct thread; 1889 int sys_exit(struct thread *, struct exit_args *); 1890 int sys_fork(struct thread *, struct fork_args *); 1891 int sys_read(struct thread *, struct read_args *); 1892 int sys_write(struct thread *, struct write_args *); 1893 int sys_open(struct thread *, struct open_args *); 1894 int sys_close(struct thread *, struct close_args *); 1895 int sys_wait4(struct thread *, struct wait4_args *); 1896 int sys_link(struct thread *, struct link_args *); 1897 int sys_unlink(struct thread *, struct unlink_args *); [all …]
|
H A D | reg.h | 47 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 D | proc.h | 194 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. */ 396 struct thread t0st_thread; argument 400 struct mtx *thread_lock_block(struct thread *); [all …]
|
H A D | ptrace.h | 217 int ptrace_set_pc(struct thread *_td, unsigned long _addr); 218 int ptrace_single_step(struct thread *_td); 219 int ptrace_clear_single_step(struct thread *_td); 222 int cpu_ptrace(struct thread *_td, int _req, void *_addr, int _data); 235 int proc_read_regs(struct thread *_td, struct reg *_reg); 236 int proc_write_regs(struct thread *_td, struct reg *_reg); 237 int proc_read_fpregs(struct thread *_td, struct fpreg *_fpreg); 238 int proc_write_fpregs(struct thread *_td, struct fpreg *_fpreg); 239 int proc_read_dbregs(struct thread *_td, struct dbreg *_dbreg); 240 int proc_write_dbregs(struct thread *_td, struct dbreg *_dbreg); [all …]
|
H A D | file.h | 51 struct thread; 102 struct thread *td); 104 struct ucred *active_cred, struct thread *td); 106 struct ucred *active_cred, struct thread *td); 108 struct ucred *active_cred, struct thread *td); 112 typedef int fo_close_t(struct file *fp, struct thread *td); 114 struct ucred *active_cred, struct thread *td); 116 struct ucred *active_cred, struct thread *td); 119 off_t *sent, int flags, struct thread *td); 121 struct thread *td); [all …]
|
H A D | filedesc.h | 229 struct thread; 243 int closef(struct file *fp, struct thread *td); 246 int dupfdopen(struct thread *td, struct filedesc *fdp, int dfd, int mode, 248 int falloc_caps(struct thread *td, struct file **resultfp, int *resultfd, 250 void falloc_abort(struct thread *td, struct file *fp); 251 int _falloc_noinstall(struct thread *td, struct file **resultfp, u_int n); 255 int finstall(struct thread *td, struct file *fp, int *resultfd, int flags, 257 int finstall_refed(struct thread *td, struct file *fp, int *resultfd, int flags, 259 int fdalloc(struct thread *td, int minfd, int *result); 260 int fdallocn(struct thread *td, int minfd, int *fds, int n); [all …]
|
/freebsd/lib/libthr/thread/ |
H A D | thr_list.c | 74 static void thr_destroy(struct pthread *curthread, struct pthread *thread); 134 struct pthread *thread = NULL; in _thr_alloc() local 142 if ((thread = TAILQ_FIRST(&free_threadq)) != NULL) { in _thr_alloc() 143 TAILQ_REMOVE(&free_threadq, thread, tle); in _thr_alloc() 149 if (thread == NULL) { in _thr_alloc() 153 thread = __thr_calloc(1, sizeof(struct pthread)); in _thr_alloc() 154 if (thread == NULL) { in _thr_alloc() 158 if ((thread->sleepqueue = _sleepq_alloc()) == NULL || in _thr_alloc() 159 (thread->wake_addr = _thr_alloc_wake_addr()) == NULL) { in _thr_alloc() 160 thr_destroy(curthread, thread); in _thr_alloc() [all …]
|
H A D | thr_suspend_np.c | 49 _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 D | thr_info.c | 47 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 D | thr_resume_np.c | 44 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 …]
|
/freebsd/contrib/llvm-project/llvm/include/llvm/Support/ |
H A D | thread.h | 38 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 …]
|
/freebsd/contrib/llvm-project/libcxx/include/ |
H A D | thread | 15 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 …]
|
/freebsd/sys/contrib/ck/src/ |
H A D | ck_hp.c | 221 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 …]
|
/freebsd/sys/arm64/include/ |
H A D | vfp.h | 69 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 …]
|
/freebsd/contrib/llvm-project/openmp/runtime/src/ |
H A D | kmp_taskdeps.h | 21 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 …]
|
/freebsd/sys/contrib/zstd/lib/common/ |
H A D | threading.c | 40 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 …]
|
/freebsd/sys/fs/nfsserver/ |
H A D | nfs_fha_new.c | 418 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 …]
|
/freebsd/sys/compat/freebsd32/ |
H A D | freebsd32_proto.h | 23 struct thread; 702 int freebsd32_wait4(struct thread *, struct freebsd32_wait4_args *); 703 int freebsd32_ptrace(struct thread *, struct freebsd32_ptrace_args *); 704 int freebsd32_recvmsg(struct thread *, struct freebsd32_recvmsg_args *); 705 int freebsd32_sendmsg(struct thread *, struct freebsd32_sendmsg_args *); 706 int freebsd32_sigaltstack(struct thread *, struct freebsd32_sigaltstack_args *); 707 int freebsd32_ioctl(struct thread *, struct freebsd32_ioctl_args *); 708 int freebsd32_execve(struct thread *, struct freebsd32_execve_args *); 709 int freebsd32_mprotect(struct thread *, struct freebsd32_mprotect_args *); 710 int freebsd32_setitimer(struct thread *, struct freebsd32_setitimer_args *); [all …]
|
/freebsd/sys/kern/ |
H A D | p1003_1b.c | 62 syscall_not_present(struct thread *td, const char *s, struct nosys_args *uap) in syscall_not_present() 110 sys_sched_setparam(struct thread *td, struct sched_setparam_args *uap) 112 struct thread *targettd; 138 kern_sched_setparam(struct thread *td, struct thread *targettd, 155 sys_sched_getparam(struct thread *td, struct sched_getparam_args *uap) 159 struct thread *targettd; 182 kern_sched_getparam(struct thread *td, struct thread *targettd, 198 sys_sched_setscheduler(struct thread *td, struct sched_setscheduler_args *uap) 202 struct thread *targettd; 227 kern_sched_setscheduler(struct thread *td, struct thread *targettd, [all …]
|
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/ |
H A D | sanitizer_thread_arg_retval.h | 11 // Tracks thread arguments and return value for leak checking. 27 // class keeps data up to the detach or join, as exited thread still can be 41 // prevent child thread from proceeding without thread handle. 42 template <typename CreateFn /* returns thread id on success, or 0 */> 47 if (uptr thread = fn()) in Create() local 48 CreateLocked(thread, detached, args); in Create() 51 // Returns thread arg and routine. 52 Args GetArgs(uptr thread) const; 54 // Mark thread a 60 Detach(uptr thread,const DetachFn & fn) Detach() argument 70 Join(uptr thread,const JoinFn & fn) Join() argument [all...] |
/freebsd/sys/contrib/ck/include/spinlock/ |
H A D | hclh.h | 76 struct ck_spinlock_hclh *thread) in ck_spinlock_hclh_lock() argument 81 thread->wait = true; in ck_spinlock_hclh_lock() 82 thread->splice = false; in ck_spinlock_hclh_lock() 83 thread->cluster_id = (*local_queue)->cluster_id; in ck_spinlock_hclh_lock() 85 thread->previous = *local_queue; in ck_spinlock_hclh_lock() 91 previous = ck_pr_fas_ptr(local_queue, thread); in ck_spinlock_hclh_lock() 92 thread->previous = previous; in ck_spinlock_hclh_lock() 98 ck_pr_load_int(&previous->cluster_id) == thread->cluster_id && in ck_spinlock_hclh_lock() 103 if (ck_pr_load_int(&previous->cluster_id) == thread->cluster_id && in ck_spinlock_hclh_lock() 123 ck_spinlock_hclh_unlock(struct ck_spinlock_hclh **thread) in ck_spinlock_hclh_unlock() argument [all …]
|
/freebsd/contrib/llvm-project/lldb/source/Target/ |
H A D | ThreadPlanStepInstruction.cpp | 23 ThreadPlanStepInstruction::ThreadPlanStepInstruction(Thread &thread, in ThreadPlanStepInstruction() argument 29 "Step over single instruction", thread, report_stop_vote, in ThreadPlanStepInstruction() 40 Thread &thread = GetThread(); in SetUpState() local 41 m_instruction_addr = thread.GetRegisterContext()->GetPC(0); in SetUpState() 42 StackFrameSP start_frame_sp(thread.GetStackFrameAtIndex(0)); in SetUpState() 48 StackFrameSP parent_frame_sp = thread.GetStackFrameAtIndex(1); in SetUpState() 100 Thread &thread = GetThread(); in IsPlanStale() local 101 StackID cur_frame_id = thread.GetStackFrameAtIndex(0)->GetStackID(); in IsPlanStale() 104 uint64_t pc = thread.GetRegisterContext()->GetPC(0); in IsPlanStale() 112 return (thread.GetRegisterContext()->GetPC(0) != m_instruction_addr); in IsPlanStale() [all …]
|
/freebsd/contrib/llvm-project/libcxx/include/__thread/ |
H A D | thread.h | 147 class _LIBCPP_EXPORTED_FROM_ABI thread { 150 thread(const thread&); 151 thread& operator=(const thread&); 157 _LIBCPP_HIDE_FROM_ABI thread() _NOEXCEPT : __t_(_LIBCPP_NULL_THREAD) {} 159 …template <class _Fp, class... _Args, __enable_if_t<!is_same<__remove_cvref_t<_Fp>, thread>::value,… 160 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS explicit thread(_Fp&& __f, _Args&&... __args); 163 _LIBCPP_METHOD_TEMPLATE_IMPLICIT_INSTANTIATION_VIS explicit thread(_Fp __f); 165 ~thread(); 167 …_LIBCPP_HIDE_FROM_ABI thread(thread&& __t) _NOEXCEPT : __t_(__t.__t_) { __t.__t_ = _LIBCPP_NULL_TH… 169 _LIBCPP_HIDE_FROM_ABI thread& operator=(thread&& __t) _NOEXCEPT { [all …]
|