signaling unix threads

Marcus Meissner marcus at
Mon Nov 8 01:25:02 CST 2004

On Sun, Nov 07, 2004 at 10:14:40PM -0800, Dan Kegel wrote:
> Mike Hearn wrote:
> > I quite liked Michaels idea of the RT signals. Is there some reason we
> > can't use them?
> I didn't see Michael's proposal.  Can you point to it?
> Now, I don't pretend to understand the issues here, but reading your patch,
> I see the comment
>      * ... there is a race with SuspendThread(): the app
>      * can call SuspendThread() then GetThreadContext() whilst the
>      * target is processing SIGUSR1 but before it's been able to
>      * override the thread context, ie the context returned would be
>      * meaningless to the app (internals of Wine itself).
> I understand similar races are present in real Windows, too.
> e.g. says
> "[with SuspendThread,] there???s a significant risk of leaving a
> thread suspended at a ???bad??? spot.  If you call SuspendThread

Thats why SafeDisc for instance creates process in "suspended" already and
then hacks into them with Get/SetThreadContext

Ciao, Marcus

More information about the wine-devel mailing list