From a0b57563b1317e0000a67a7bed4c1712403682f3 Mon Sep 17 00:00:00 2001 From: Christian Biesinger Date: Tue, 1 Oct 2019 18:38:35 -0500 Subject: Implement a thread pool This adds a simple thread pool to gdb. In the end, this seemed preferable to the approach taken in an earlier version of this series; namely, starting threads in the parallel-foreach implementation. This approach reduces the overhead of starting new threads, and also lets the user control (in a subsequent patch) exactly how many worker threads are running. gdb/ChangeLog 2019-11-26 Christian Biesinger Tom Tromey * gdbsupport/thread-pool.h: New file. * gdbsupport/thread-pool.c: New file. * Makefile.in (COMMON_SFILES): Add thread-pool.c. (HFILES_NO_SRCDIR): Add thread-pool.h. Change-Id: I597bb642780cb9d578ca92373d2a638efb44fe52 --- gdb/Makefile.in | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gdb/Makefile.in') diff --git a/gdb/Makefile.in b/gdb/Makefile.in index c487b10..b07b11e 100644 --- a/gdb/Makefile.in +++ b/gdb/Makefile.in @@ -995,6 +995,7 @@ COMMON_SFILES = \ gdbsupport/signals.c \ gdbsupport/signals-state-save-restore.c \ gdbsupport/tdesc.c \ + gdbsupport/thread-pool.c \ gdbsupport/xml-utils.c \ complaints.c \ completer.c \ @@ -1499,6 +1500,7 @@ HFILES_NO_SRCDIR = \ gdbsupport/signals-state-save-restore.h \ gdbsupport/symbol.h \ gdbsupport/tdesc.h \ + gdbsupport/thread-pool.h \ gdbsupport/version.h \ gdbsupport/x86-xstate.h \ gdbsupport/xml-utils.h \ -- cgit v1.1