Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@adacore.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tromey@adacore.com>
Subject: [PATCH 2/3] Don't rely on deduction in run-on-main-thread.c
Date: Wed, 01 Oct 2025 12:57:48 -0600	[thread overview]
Message-ID: <20251001-isolate-cxx-thread-v1-2-4bb740be2467@adacore.com> (raw)
In-Reply-To: <20251001-isolate-cxx-thread-v1-0-4bb740be2467@adacore.com>

This changes one spot in run-on-main-thread.c to use an explicit
template argument, rather than relying on deduction.  The deduction
would otherwise fail with the next patch.
---
 gdb/run-on-main-thread.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/run-on-main-thread.c b/gdb/run-on-main-thread.c
index bf53163b6b717bc7101619da15ce45810952284d..0cfe4716c24739f4de3daacff555e546ea2e5925 100644
--- a/gdb/run-on-main-thread.c
+++ b/gdb/run-on-main-thread.c
@@ -151,7 +151,7 @@ INIT_GDB_FILE (run_on_main_thread)
   add_final_cleanup ([] ()
     {
 #if CXX_STD_THREAD
-      std::lock_guard lock (runnable_mutex);
+      std::lock_guard<std::mutex> lock (runnable_mutex);
 #endif
       runnables.clear ();
     });

-- 
2.51.0


  parent reply	other threads:[~2025-10-01 19:02 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-01 18:57 [PATCH 0/3] Add compatibility definitions for C++ thread support Tom Tromey
2025-10-01 18:57 ` [PATCH 1/3] Remove an unused include Tom Tromey
2025-10-01 20:04   ` Simon Marchi
2025-10-02 12:59     ` Tom Tromey
2025-10-01 18:57 ` Tom Tromey [this message]
2025-10-01 18:57 ` [PATCH 3/3] Introduce gdbsupport/cxx-thread.h and use it Tom Tromey
2025-10-01 20:16   ` Simon Marchi
2025-10-02 16:58     ` Tom Tromey
2025-10-02 18:09       ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251001-isolate-cxx-thread-v1-2-4bb740be2467@adacore.com \
    --to=tromey@adacore.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox