/dragonfly/sys/kern/ |
H A D | kern_ktrace.c | 74 thread_t td = curthread; in ktrgetheader() local 75 struct proc *p = td->td_proc; in ktrgetheader() 76 struct lwp *lp = td->td_lwp; in ktrgetheader() 293 struct thread *td = curthread; in sys_ktrace() local 294 struct proc *curp = td->td_proc; in sys_ktrace() 444 struct thread *td = curthread; /* XXX */ in sys_utrace() local 448 if (!KTRPOINT(td, KTR_USER)) in sys_utrace() 452 td->td_lwp->lwp_traceflag |= KTRFAC_ACTIVE; in sys_utrace() 462 ktrwrite(td->td_lwp, &kth, NULL); in sys_utrace() 512 if (!ktrcanset(td, p)) in ktrops() [all …]
|
H A D | sys_generic.c | 138 auio.uio_td = td; in sys_read() 169 auio.uio_td = td; in sys_extpread() 201 auio.uio_td = td; in sys_readv() 233 auio.uio_td = td; in sys_extpreadv() 263 dropfp(td, fd, fp); in kern_preadv() 344 auio.uio_td = td; in sys_write() 376 auio.uio_td = td; in sys_extpwrite() 405 auio.uio_td = td; in sys_writev() 437 auio.uio_td = td; in sys_extpwritev() 467 dropfp(td, fd, fp); in kern_pwritev() [all …]
|
H A D | kern_descrip.c | 340 for (fdc = &td->td_fdcache[0]; fdc < &td->td_fdcache[NFDCACHE]; ++fdc) { in _holdfp_cache() 389 fdp = td->td_proc->p_fd; in _holdfp_cache() 416 for (fdc = &td->td_fdcache[0]; fdc < &td->td_fdcache[NFDCACHE]; ++fdc) { in _holdfp_cache() 523 for (fdc = &td->td_fdcache[0]; fdc < &td->td_fdcache[NFDCACHE]; ++fdc) { in dropfp() 570 fexitcache(thread_t td) in fexitcache() argument 624 limit = td->td_limit; in readplimits() 630 if (td->td_limit) in readplimits() 632 td->td_limit = limit; in readplimits() 2112 if (td->td_proc && td->td_proc->p_fd == fdp) { in checkfdclosed() 3177 thread_t td; in fdopen() local [all …]
|
H A D | kern_fp.c | 98 struct thread *td; in fp_open() local 103 td = curthread; in fp_open() 104 if (td->td_proc) in fp_open() 105 fsetcred(*fpp, td->td_proc->p_ucred); in fp_open() 132 struct thread *td; in fp_vpopen() local 137 td = curthread; in fp_vpopen() 165 error = VOP_ACCESS(vp, vmode, td->td_proc->p_ucred); in fp_vpopen() 175 if (td->td_proc) in fp_vpopen() 176 fsetcred(*fpp, td->td_proc->p_ucred); in fp_vpopen() 396 struct thread *td = curthread; in fp_mmap() local [all …]
|
H A D | kern_shutdown.c | 756 thread_t td = gd->gd_curthread; in panic() local 788 mycpu->gd_cpuid, td); in panic() 790 td->td_release = NULL; /* be a grinch */ in panic() 792 lwkt_deschedule_self(td); in panic() 819 panic_tokens_count = td->td_toks_stop - &td->td_toks_base; in panic() 821 lwkt_relalltokens(td); in panic() 822 td->td_toks_stop = &td->td_toks_base; in panic() 924 struct thread *td; in shutdown_kproc() local 931 td = (struct thread *)arg; in shutdown_kproc() 932 if ((p = td->td_proc) != NULL) { in shutdown_kproc() [all …]
|
H A D | kern_intr.c | 123 #define TD_INVARIANTS_GET(td) argument 692 ++td->td_nest_count; in ithread_fast_sched() 693 crit_exit_quick(td); in ithread_fast_sched() 695 crit_enter_quick(td); in ithread_fast_sched() 696 --td->td_nest_count; in ithread_fast_sched() 721 thread_t td; in ithread_fast_handler() local 725 td = curthread; in ithread_fast_handler() 728 KKASSERT(td->td_critcount); in ithread_fast_handler() 741 ithread_fast_sched(intr, td); in ithread_fast_handler() 765 TD_INVARIANTS_GET(td); in ithread_fast_handler() [all …]
|
H A D | lwkt_msgport.c | 325 lwkt_schedule(td); in _lwkt_schedule_msg() 345 port->mpu_td = td; in lwkt_initport_thread() 361 if (td == NULL) in lwkt_initport_spin() 380 port->mpu_td = td; in lwkt_initport_spin() 772 thread_t td = curthread; in lwkt_thread_waitmsg() local 785 crit_enter_quick(td); in lwkt_thread_waitmsg() 801 crit_exit_quick(td); in lwkt_thread_waitmsg() 807 crit_enter_quick(td); in lwkt_thread_waitmsg() 815 crit_exit_quick(td); in lwkt_thread_waitmsg() 835 crit_enter_quick(td); in lwkt_thread_waitport() [all …]
|
H A D | vfs_default.c | 345 cnp.cn_td = td; in vop_compat_ncreate() 424 cnp.cn_td = td; in vop_compat_nmkdir() 504 cnp.cn_td = td; in vop_compat_nmknod() 589 cnp.cn_td = td; in vop_compat_nlink() 659 cnp.cn_td = td; in vop_compat_nsymlink() 742 cnp.cn_td = td; in vop_compat_nwhiteout() 830 cnp.cn_td = td; in vop_compat_nremove() 900 cnp.cn_td = td; in vop_compat_nrmdir() 994 fcnp.cn_td = td; in vop_compat_nrename() 1050 tcnp.cn_td = td; in vop_compat_nrename() [all …]
|
H A D | sysv_sem.c | 349 struct thread *td = curthread; in sys___semctl() local 350 struct prison *pr = td->td_proc->p_ucred->cr_prison; in sys___semctl() 356 struct ucred *cred = td->td_ucred; in sys___semctl() 576 struct thread *td = curthread; in sys_semget() local 577 struct prison *pr = td->td_proc->p_ucred->cr_prison; in sys_semget() 582 struct ucred *cred = td->td_ucred; in sys_semget() 612 if ((eval = ipcperm(td->td_proc, in sys_semget() 730 struct thread *td = curthread; in sys_semop() local 984 eval = semundo_adjust(td->td_proc, semid, in sys_semop() 1004 if (semundo_adjust(td->td_proc, semid, in sys_semop() [all …]
|
H A D | uipc_msg.c | 181 msg.nm_td = td; /* used only for prison_ip() */ in so_pru_bind() 196 msg.nm_td = td; in so_pru_connect() 221 return so_pru_connect(so, nam, td); in so_pru_connect_async() 232 lwkt_hold(td); in so_pru_connect_async() 240 msg->nm_td = td; in so_pru_connect_async() 341 so_pru_listen(struct socket *so, struct thread *td) in so_pru_listen() argument 348 msg.nm_td = td; /* used only for prison_ip() XXX JH */ in so_pru_listen() 440 msg.nm_td = td; in so_pru_send() 472 so_pru_send(so, flags, m, addr0, control, td); in so_pru_send_async() 481 lwkt_hold(td); in so_pru_send_async() [all …]
|
/dragonfly/sys/vfs/nfs/ |
H A D | nfs_bio.c | 95 struct thread *td; in nfs_bioread() local 113 td = uio->uio_td; in nfs_bioread() 324 NFS_DIRBLKSIZ, td); in nfs_bioread() 612 if (td && td->td_proc && uio->uio_offset + uio->uio_resid > in nfs_write() 614 lwpsignal(td->td_proc, td->td_lwp, SIGXFSZ); in nfs_write() 867 thread_t td = curthread; in nfs_vinvalbuf() local 1007 nfs_doio(vp, bio, td); in nfs_startio() 1024 nfs_doio(vp, bio, td); in nfs_startio() 1086 uiop->uio_td = td; in nfs_doio() 1123 if (td && td->td_proc && (vp->v_flag & VTEXT) && in nfs_doio() [all …]
|
H A D | nfs_mountrpc.c | 130 struct thread *td) in md_mount() argument 141 &mdsin->sin_port, td); in md_mount() 147 RPCMNT_MOUNT, &m, NULL, td); in md_mount() 156 &mdsin->sin_port, td); in md_mount() 164 RPCMNT_MOUNT, &m, NULL, td); in md_mount() 205 &mdsin->sin_port, td); in md_mount() 223 struct thread *td) in md_lookup_swap() argument 254 NFSPROC_LOOKUP, &m, NULL, td); in md_lookup_swap() 257 NFSV2PROC_LOOKUP, &m, NULL, td); in md_lookup_swap()
|
/dragonfly/gnu/usr.bin/gdb/kgdb/ |
H A D | kthr.c | 79 struct thread td; in kgdb_thr_init() local 143 if (kvm_read(kvm, addr, &td, sizeof(td)) != sizeof(td)) { in kgdb_thr_init() 153 (uintptr_t)td.td_pcb; in kgdb_thr_init() 154 kt->kstack = (uintptr_t)td.td_kstack; in kgdb_thr_init() 155 if (td.td_proc != NULL) { in kgdb_thr_init() 156 paddr = (uintptr_t)td.td_proc; in kgdb_thr_init() 161 addr = (uintptr_t)td.td_lwp; in kgdb_thr_init() 184 addr = (uintptr_t)TAILQ_NEXT(&td, td_allq); in kgdb_thr_init()
|
/dragonfly/usr.bin/evtranalyze/ |
H A D | evtranalyze.c | 588 c->td ? c->td->comm : "unknown", in draw_ctx_switch() 589 c->td ? c->td->id: NULL); in draw_ctx_switch() 621 if (!td) { in top_threads_update() 650 td = tmp; in top_threads_update() 684 if (c->td) { in ctxsw_prepare_event() 698 c->td = ev->td; in ctxsw_prepare_event() 754 if (!td) in ctxsw_draw_pre() 760 td->comm, td->id); in ctxsw_draw_pre() 803 c->td = ev->td; in ctxsw_draw_event() 1043 ev.td ? ev.td->comm : "unknown", in cmd_show() [all …]
|
/dragonfly/sys/net/ |
H A D | if_poll.c | 549 crit_enter_quick(td); in stpoll_handler() 555 crit_exit_quick(td); in stpoll_handler() 573 crit_exit_quick(td); in stpoll_handler() 833 crit_enter_quick(td); in rxpoll_handler() 839 crit_exit_quick(td); in rxpoll_handler() 903 crit_exit_quick(td); in rxpoll_handler() 910 crit_exit_quick(td); in rxpoll_handler() 958 crit_exit_quick(td); in txpoll_handler() 964 crit_exit_quick(td); in txpoll_handler() 1050 crit_exit_quick(td); in rxpollmore_handler() [all …]
|
/dragonfly/sys/sys/ |
H A D | sleepqueue.h | 97 void sleepq_setup_thread(struct thread *td); 98 void sleepq_teardown_thread(struct thread *td); 107 int sleepq_abort(struct thread *td, int intrval); 109 void sleepq_remove(struct thread *td, const void *wchan); 112 void sleepq_remove_nested(struct thread *td);
|
H A D | filedesc.h | 177 struct file *holdfp (struct thread *td, int fd, int flag); 180 int holdsock (struct thread *td, int fdes, struct file **fpp); 181 int holdvnode (struct thread *td, int fd, struct file **fpp); 182 int holdvnode2 (struct thread *td, int fd, struct file **fpp, 184 void dropfp(struct thread *td, int fd, struct file *fp); 193 void fexitcache(struct thread *td);
|
/dragonfly/sys/dev/drm/ |
H A D | linux_kthread.c | 50 struct thread *td; in kthread_run() local 57 ret = kthread_alloc(linux_ktfn_wrapper, task, &td, namefmt, args); in kthread_run() 64 task->dfly_td = td; in kthread_run() 65 td->td_linux_task = task; in kthread_run() 74 lwkt_schedule(td); in kthread_run()
|
/dragonfly/sys/vfs/hammer/ |
H A D | hammer_subs.c | 43 thread_t td = curthread; in hammer_lock_ex_ident() local 54 lock->lowner = td; in hammer_lock_ex_ident() 58 lock->lowner == td) { in hammer_lock_ex_ident() 84 thread_t td = curthread; in hammer_lock_ex_try() local 96 lock->lowner = td; in hammer_lock_ex_try() 101 lock->lowner == td) { in hammer_lock_ex_try() 124 thread_t td = curthread; in hammer_lock_sh() local 161 thread_t td = curthread; in hammer_lock_sh_try() local 207 thread_t td = curthread; in hammer_lock_upgrade() local 218 lock->lowner = td; in hammer_lock_upgrade() [all …]
|
/dragonfly/sys/netproto/smb/ |
H A D | smb_subr.c | 67 smb_makescred(struct smb_cred *scred, struct thread *td, struct ucred *cred) in smb_makescred() argument 69 scred->scr_td = td; in smb_makescred() 70 if (td && td->td_proc) { in smb_makescred() 71 scred->scr_cred = cred ? cred : td->td_proc->p_ucred; in smb_makescred() 78 smb_proc_intr(struct thread *td) in smb_proc_intr() argument 84 if (td == NULL || (p = td->td_proc) == NULL) in smb_proc_intr() 86 lp = td->td_lwp; in smb_proc_intr()
|
/dragonfly/sys/platform/pc64/x86_64/ |
H A D | mp_flame.c | 99 thread_t td; in hard_sniff() local 121 td = gd->gd_curthread; in hard_sniff() 122 if (td == NULL) in hard_sniff() 124 bot = (char *)td->td_kstack + PAGE_SIZE; /* skip guard */ in hard_sniff() 125 top = (char *)td->td_kstack + td->td_kstack_size; in hard_sniff()
|
/dragonfly/sys/vfs/mfs/ |
H A D | mfs_vfsops.c | 77 char *path, caddr_t data, struct ucred *td); 438 thread_t td = curthread; in mfs_start() local 450 mfsp->mfs_td = td; in mfs_start() 479 KKASSERT(td->td_proc); in mfs_start() 480 lwkt_gettoken(&td->td_proc->p_token); in mfs_start() 481 sig = CURSIG(td->td_lwp); in mfs_start() 483 spin_lock(&td->td_lwp->lwp_spin); in mfs_start() 484 lwp_delsig(td->td_lwp, sig, 1); in mfs_start() 485 spin_unlock(&td->td_lwp->lwp_spin); in mfs_start() 487 lwkt_reltoken(&td->td_proc->p_token); in mfs_start()
|
/dragonfly/sys/bus/u4b/ |
H A D | usb_dragonfly.h | 57 #define USB_TD_GET_PROC(td) (td)->td_proc argument 58 #define USB_PROC_GET_GID(td) (td)->p_pgid argument
|
/dragonfly/sys/vfs/smbfs/ |
H A D | smbfs_node.c | 58 #define smbfs_hash_lock(smp, td) lockmgr(&smp->sm_hashlock, LK_EXCLUSIVE) argument 59 #define smbfs_hash_unlock(smp, td) lockmgr(&smp->sm_hashlock, LK_RELEASE) argument 195 smbfs_hash_lock(smp, td); in smbfs_node_alloc() 203 smbfs_hash_unlock(smp, td); in smbfs_node_alloc() 221 smbfs_hash_unlock(smp, td); in smbfs_node_alloc() 252 smbfs_hash_lock(smp, td); in smbfs_node_alloc() 263 smbfs_hash_unlock(smp, td); in smbfs_node_alloc() 304 smbfs_hash_lock(smp, td); in smbfs_reclaim() 316 smbfs_hash_unlock(smp, td); in smbfs_reclaim() 428 smbfs_hash_lock(smp, td); in smbfs_attr_cacherename() [all …]
|
/dragonfly/sys/netinet/ |
H A D | tcp_usrreq.c | 380 error = in_pcbbind(inp, nam, td); in tcp_usr_bind() 612 lwkt_rele(td); in tcp_usr_connect() 961 struct thread *td __unused) in tcp_usr_preconnect() 1287 lwkt_rele(td); in tcp_connect() 1299 lwkt_rele(td); in tcp_connect() 1473 struct thread *td = NULL; in tcp_ctloutput() local 1479 td = sopt->sopt_td; in tcp_ctloutput() 1537 if (td != NULL) in tcp_ctloutput() 1538 lwkt_rele(td); in tcp_ctloutput() 1704 if (td != NULL) in tcp_ctloutput() [all …]
|