Date: Tue, 10 Nov 2020 01:57:48 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r367544 - in head/sys: kern sys Message-ID: <202011100157.0AA1vmtM016302@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mjg Date: Tue Nov 10 01:57:48 2020 New Revision: 367544 URL: https://svnweb.freebsd.org/changeset/base/367544 Log: thread: retire thread_find tdfind should be used instead. Modified: head/sys/kern/kern_thread.c head/sys/sys/proc.h Modified: head/sys/kern/kern_thread.c ============================================================================== --- head/sys/kern/kern_thread.c Tue Nov 10 01:57:19 2020 (r367543) +++ head/sys/kern/kern_thread.c Tue Nov 10 01:57:48 2020 (r367544) @@ -1325,19 +1325,6 @@ thread_single_end(struct proc *p, int mode) kick_proc0(); } -struct thread * -thread_find(struct proc *p, lwpid_t tid) -{ - struct thread *td; - - PROC_LOCK_ASSERT(p, MA_OWNED); - FOREACH_THREAD_IN_PROC(p, td) { - if (td->td_tid == tid) - break; - } - return (td); -} - /* Locate a thread by number; return with proc lock held. */ struct thread * tdfind(lwpid_t tid, pid_t pid) Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Tue Nov 10 01:57:19 2020 (r367543) +++ head/sys/sys/proc.h Tue Nov 10 01:57:48 2020 (r367544) @@ -1153,7 +1153,6 @@ void thread_suspend_one(struct thread *td); void thread_unlink(struct thread *td); void thread_unsuspend(struct proc *p); void thread_wait(struct proc *p); -struct thread *thread_find(struct proc *p, lwpid_t tid); void stop_all_proc(void); void resume_all_proc(void);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011100157.0AA1vmtM016302>