public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [ob/pushed] Delete delete_thread_silent
@ 2022-06-24 10:26 Pedro Alves
  2022-06-24 16:25 ` Pedro Alves
  0 siblings, 1 reply; 2+ messages in thread
From: Pedro Alves @ 2022-06-24 10:26 UTC (permalink / raw)
  To: gdb-patches

delete_thread_silent is no longer used anywhere.  Delete it.

Change-Id: Iafcec12339861d5ab2e29c14d7b1f884c9e11c0f
---
 gdb/gdbthread.h |  4 ----
 gdb/thread.c    | 28 +++++-----------------------
 2 files changed, 5 insertions(+), 27 deletions(-)

diff --git a/gdb/gdbthread.h b/gdb/gdbthread.h
index 1a33eb61221..1f17ad7d9e7 100644
--- a/gdb/gdbthread.h
+++ b/gdb/gdbthread.h
@@ -623,10 +623,6 @@ extern struct thread_info *add_thread_with_info (process_stratum_target *targ,
    as exited and do the notification.  */
 extern void delete_thread (struct thread_info *thread);
 
-/* Like delete_thread, but be quiet about it.  Used when the process
-   this thread belonged to has already exited, for example.  */
-extern void delete_thread_silent (struct thread_info *thread);
-
 /* Mark the thread exited, but don't delete it or remove it from the
    inferior thread list.  */
 extern void set_thread_exited (thread_info *tp, bool silent);
diff --git a/gdb/thread.c b/gdb/thread.c
index 378c5ee2d13..f0ad82e76d7 100644
--- a/gdb/thread.c
+++ b/gdb/thread.c
@@ -450,20 +450,16 @@ global_thread_step_over_chain_remove (struct thread_info *tp)
   global_thread_step_over_list.erase (it);
 }
 
-/* Delete the thread referenced by THR.  If SILENT, don't notify
-   the observer of this exit.
-   
-   THR must not be NULL or a failed assertion will be raised.  */
+/* See gdbthread.h.  */
 
-static void
-delete_thread_1 (thread_info *thr, bool silent)
+void
+delete_thread (thread_info *thr)
 {
   gdb_assert (thr != nullptr);
 
-  threads_debug_printf ("deleting thread %s, silent = %d",
-			thr->ptid.to_string ().c_str (), silent);
+  threads_debug_printf ("deleting thread %s", thr->ptid.to_string ().c_str ());
 
-  set_thread_exited (thr, silent);
+  set_thread_exited (thr, false);
 
   if (!thr->deletable ())
     {
@@ -477,20 +473,6 @@ delete_thread_1 (thread_info *thr, bool silent)
   delete thr;
 }
 
-/* See gdbthread.h.  */
-
-void
-delete_thread (thread_info *thread)
-{
-  delete_thread_1 (thread, false /* not silent */);
-}
-
-void
-delete_thread_silent (thread_info *thread)
-{
-  delete_thread_1 (thread, true /* silent */);
-}
-
 struct thread_info *
 find_thread_global_id (int global_id)
 {

base-commit: 54603ee2aeaf248220f0f440c322ff02e98cd403
-- 
2.36.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ob/pushed] Delete delete_thread_silent
  2022-06-24 10:26 [ob/pushed] Delete delete_thread_silent Pedro Alves
@ 2022-06-24 16:25 ` Pedro Alves
  0 siblings, 0 replies; 2+ messages in thread
From: Pedro Alves @ 2022-06-24 16:25 UTC (permalink / raw)
  To: gdb-patches

On 2022-06-24 11:26, Pedro Alves wrote:
> delete_thread_silent is no longer used anywhere.  Delete it.
> 
> Change-Id: Iafcec12339861d5ab2e29c14d7b1f884c9e11c0f

Well, that was a bit too trigger happy.  The AMDGPU port that we're about to contribute
needs this, lol.  We use matched add_thread_silent/delete_thread_silent calls, as
otherwise you get thousands of new/exited thread notifications on the cli.  Somehow
I missed it.

I've now reverted the patch.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-06-24 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-24 10:26 [ob/pushed] Delete delete_thread_silent Pedro Alves
2022-06-24 16:25 ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).