[PATCH v2 6/7] Cygwin: cygtls: Prompt system to switch tasks explicitly in lock()
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Nov 27 17:00:15 GMT 2024
On Nov 26 17:55, Takashi Yano wrote:
> This patch calls Sleep() in lock() in order to increase the chance
> of being unlocked in other threads. The lock(), unlock() and locked()
> are moved from sigfe.s to cygtls.h so that allows inline expansion.
When doing the locking in C++, we should really make stacklock volatile.
That affects especially the unlock and locked methods, where you'll
never know how gcc optimizes away.
spinning should be volatile as well, but it's up to you if you already
add that, or if we only do this when we add the SIGKILL patches.
Thanks,
Corinna
More information about the Cygwin-patches
mailing list