From: Tom de Vries <tdevries@suse.de>
To: Pedro Alves <pedro@palves.net>, gdb-patches@sourceware.org
Subject: Re: [PATCH] [gdb/tdep] Don't call WaitForSingleObject with INFINITE arg
Date: Fri, 6 Jun 2025 08:27:35 +0200 [thread overview]
Message-ID: <d26491a0-b450-4b36-886c-8461711ba045@suse.de> (raw)
In-Reply-To: <e9834f19-410a-4c58-8b90-04410c096a5f@palves.net>
On 6/5/25 18:25, Pedro Alves wrote:
> On 2025-06-05 17:15, Pedro Alves wrote:
>> On 2025-06-05 16:03, Tom de Vries wrote:
>
>>> Fix this by avoiding calling WaitForSingleObject with INFINITE argument.
>>
>> Approved-By: Pedro Alves <pedro@palves.net>
>>
>
> Actually, can you add a comment to the code, please, explaining why we're avoiding INFINITE?
>
> LGTM with that. :-)
>
Hi Pedro,
thanks for the review.
I've added a comment, and pushed as v2 (
https://sourceware.org/pipermail/gdb-patches/2025-June/218402.html ).
Thanks,
- Tom
> On 2025-06-05 16:03, Tom de Vries wrote:
>> while (true)
>> {
>> - DWORD r = WaitForSingleObject (handle, howlong);
>> + DWORD milliseconds = howlong == INFINITE ? 100 : howlong;
>> + DWORD r = WaitForSingleObject (handle, milliseconds);
>> + if (howlong == INFINITE && r == WAIT_TIMEOUT)
>> + continue;
>> if (r == WAIT_OBJECT_0)
>> return;
next prev parent reply other threads:[~2025-06-06 6:28 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-05 15:03 Tom de Vries
2025-06-05 16:15 ` Pedro Alves
2025-06-05 16:25 ` Pedro Alves
2025-06-06 6:27 ` Tom de Vries [this message]
2025-06-06 7:12 ` Tom de Vries
2025-06-06 15:14 ` Pedro Alves
2025-06-06 15:27 ` Pedro Alves
2025-06-09 17:52 ` Pedro Alves
2025-06-10 7:13 ` Tom de Vries
2025-06-06 13:11 ` Pedro Alves
2025-06-10 7:13 ` Tom de Vries
2025-06-10 9:51 ` Pedro Alves
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=d26491a0-b450-4b36-886c-8461711ba045@suse.de \
--to=tdevries@suse.de \
--cc=gdb-patches@sourceware.org \
--cc=pedro@palves.net \
/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