From: Lerele <lerele@champenstudios.com>
To: Pedro Alves <pedro_alves@portugalmail.pt>
Cc: gdb-patches@sourceware.org
Subject: Re: [win32] Fix suspend count handling
Date: Sat, 24 Nov 2007 17:50:00 -0000 [thread overview]
Message-ID: <4748646F.1090208@champenstudios.com> (raw)
In-Reply-To: <474847F1.3090301@portugalmail.pt>
Pedro Alves escribió:
> Lerele wrote:
>
> > This paragraph
>> makes me ask, maybe the problems you talk about were due to some
>> other reason, and not just about using SuspendThread only? Or are you
>> 100% sure it's because of that specific function?
>>
>
> Its not the function per se that's the problem. It's that when we
> suspend a thread it may be holding some internal lock, or
> some such. Calling the same function or another function that accesses
> the same internal resources from another thread may violate what
> was expected internally. My experience on porting gdbserver to WinCE,
> showed me that on WinCE at least, SuspendThread will not immediatelly
> suspend the thread -- that probably means that the OS only stops the
> threads on safe points. That a look here [1]. It may be that
> earlier versions of Windows had bugs that made that unsafe.
> (Windows CE source code is available, but I won't touch it with a
> ten-meter [2] pole.)
>
>
> [1]
> http://sourceware.org/ml/gdb-patches/2007-11/msg00220.html
> -- Yes not perfect, I know.
>
> [2]
> I think metric.
>
It's actually hard to believe those functions do not work as expected,
especially because MSDN docs specifically state using SuspendThread
before GetThreadContext, asuming the latter should work after the
former, but of course anything is possible.
If that is true, it's useless of course to use them functions.
next prev parent reply other threads:[~2007-11-24 17:50 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-21 0:35 Pedro Alves
2007-11-21 11:25 ` Pierre Muller
2007-11-21 13:43 ` Pedro Alves
2007-11-21 14:13 ` Pierre Muller
2007-11-21 15:08 ` Pedro Alves
2007-11-21 15:32 ` Pierre Muller
2007-11-21 18:19 ` Pedro Alves
2007-11-21 23:33 ` Pedro Alves
2007-11-22 9:19 ` Pierre Muller
2007-11-23 1:07 ` Christopher Faylor
2007-11-23 10:19 ` Lerele
2007-11-23 18:30 ` Lerele
2007-11-24 12:43 ` Pedro Alves
2007-11-24 14:21 ` Lerele
2007-11-24 5:33 ` Christopher Faylor
2007-11-24 14:18 ` Lerele
2007-11-24 15:49 ` Pedro Alves
2007-11-24 17:50 ` Lerele [this message]
2007-11-24 20:49 ` Christopher Faylor
2007-11-24 20:48 ` Christopher Faylor
2007-11-25 14:44 ` Lerele
2007-11-25 18:13 ` Christopher Faylor
2007-11-25 18:56 ` Pedro Alves
2007-11-25 22:05 ` Christopher Faylor
2007-11-25 22:13 ` Lerele
2007-11-25 20:34 ` Lerele
2007-11-24 12:16 ` Pedro Alves
2007-11-24 20:51 ` Christopher Faylor
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=4748646F.1090208@champenstudios.com \
--to=lerele@champenstudios.com \
--cc=gdb-patches@sourceware.org \
--cc=pedro_alves@portugalmail.pt \
/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