git: e6feeae2f915 - main - sys: rename td_coredump to td_remotereq
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 22 Dec 2022 22:10:52 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=e6feeae2f915c76275b83b7365ae966a8f8dd016 commit e6feeae2f915c76275b83b7365ae966a8f8dd016 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-11-30 08:48:24 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-12-22 21:11:35 +0000 sys: rename td_coredump to td_remotereq and TDB_COREDUMPRQ to TDB_COREDUMPREQ Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D37590 --- sys/kern/kern_sig.c | 12 ++++++------ sys/kern/sys_process.c | 8 ++++---- sys/sys/proc.h | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index c50a37de07e6..11c0334181e1 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2639,12 +2639,12 @@ ptrace_coredump(struct thread *td) MPASS(td == curthread); p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); - if ((td->td_dbgflags & TDB_COREDUMPRQ) == 0) + if ((td->td_dbgflags & TDB_COREDUMPREQ) == 0) return; KASSERT((p->p_flag & P_STOPPED_TRACE) != 0, ("not stopped")); - tcq = td->td_coredump; - KASSERT(tcq != NULL, ("td_coredump is NULL")); + tcq = td->td_remotereq; + KASSERT(tcq != NULL, ("td_remotereq is NULL")); if (p->p_sysent->sv_coredump == NULL) { tcq->tc_error = ENOSYS; @@ -2660,8 +2660,8 @@ ptrace_coredump(struct thread *td) vn_rangelock_unlock(tcq->tc_vp, rl_cookie); PROC_LOCK(p); wake: - td->td_dbgflags &= ~TDB_COREDUMPRQ; - td->td_coredump = NULL; + td->td_dbgflags &= ~TDB_COREDUMPREQ; + td->td_remotereq = NULL; wakeup(p); } @@ -2792,7 +2792,7 @@ stopme: td->td_dbgflags |= TDB_SSWITCH; thread_suspend_switch(td, p); td->td_dbgflags &= ~TDB_SSWITCH; - if ((td->td_dbgflags & TDB_COREDUMPRQ) != 0) { + if ((td->td_dbgflags & TDB_COREDUMPREQ) != 0) { PROC_SUNLOCK(p); ptrace_coredump(td); PROC_SLOCK(p); diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index c61234e726b9..15b93cee0f5a 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1559,7 +1559,7 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) error = EBUSY; goto coredump_cleanup_locked; } - KASSERT((td2->td_dbgflags & TDB_COREDUMPRQ) == 0, + KASSERT((td2->td_dbgflags & TDB_COREDUMPREQ) == 0, ("proc %d tid %d req coredump", p->p_pid, td2->td_tid)); tcq->tc_vp = fp->f_vnode; @@ -1569,10 +1569,10 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) tcq->tc_flags |= SVC_NOCOMPRESS; if ((pc->pc_flags & PC_ALL) != 0) tcq->tc_flags |= SVC_ALL; - td2->td_coredump = tcq; - td2->td_dbgflags |= TDB_COREDUMPRQ; + td2->td_remotereq = tcq; + td2->td_dbgflags |= TDB_COREDUMPREQ; thread_run_flash(td2); - while ((td2->td_dbgflags & TDB_COREDUMPRQ) != 0) + while ((td2->td_dbgflags & TDB_COREDUMPREQ) != 0) msleep(p, &p->p_mtx, PPAUSE, "crdmp", 0); error = tcq->tc_error; coredump_cleanup_locked: diff --git a/sys/sys/proc.h b/sys/sys/proc.h index f9e905bb22d2..1552da628b11 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -384,7 +384,7 @@ struct thread { int td_oncpu; /* (t) Which cpu we are on. */ void *td_lkpi_task; /* LinuxKPI task struct pointer */ int td_pmcpend; - void *td_coredump; /* (c) coredump request. */ + void *td_remotereq; /* (c) dbg remote request. */ off_t td_ktr_io_lim; /* (k) limit for ktrace file size */ #ifdef EPOCH_TRACE SLIST_HEAD(, epoch_tracker) td_epochs; @@ -522,7 +522,7 @@ enum { #define TDB_FSTP 0x00001000 /* The thread is PT_ATTACH leader */ #define TDB_STEP 0x00002000 /* (x86) PSL_T set for PT_STEP */ #define TDB_SSWITCH 0x00004000 /* Suspended in ptracestop */ -#define TDB_COREDUMPRQ 0x00008000 /* Coredump request */ +#define TDB_COREDUMPREQ 0x00008000 /* Coredump request */ /* * "Private" flags kept in td_pflags: