]> granicus.if.org Git - gc/commit
Refactoring of WoW64 workaround (Win32)
authorIvan Maidanski <ivmai@mail.ru>
Thu, 5 Sep 2019 08:44:27 +0000 (11:44 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 5 Sep 2019 08:44:27 +0000 (11:44 +0300)
commit5ff5ddaa6fc077c15e83c7076835a530b716e4a3
treecee129fb63d38db2c017e57997e7646f381d61f0
parent0cd8caff0ac9542a16aea5f8a020358bc9630def
Refactoring of WoW64 workaround (Win32)
(code refactoring of commit 9483d5bba)

Issue #262 (bdwgc).

* include/private/gcconfig.h [I386 && (CYGWIN32 || MSWIN32)]
(WOW64_THREAD_CONTEXT_WORKAROUND): Define macro.
* win32_threads.c [!CONTEXT_EXCEPTION_ACTIVE] (CONTEXT_EXCEPTION_ACTIVE,
CONTEXT_EXCEPTION_REQUEST, CONTEXT_EXCEPTION_REPORTING): Move macro
definition upper to be before GC_suspend(); define only if
WOW64_THREAD_CONTEXT_WORKAROUND is defined (instead of I386).
* win32_threads.c (isWow64): Move static variable upper to be before
GC_suspend(); define only if WOW64_THREAD_CONTEXT_WORKAROUND.
* win32_threads.c (GET_THREAD_CONTEXT_FLAGS): New macro.
* win32_threads.c (GC_push_stack_for): Always set context.ContextFlags
to GET_THREAD_CONTEXT_FLAGS.
* win32_threads.c [I386] (GC_push_stack_for): Always store context.Esp
to sp (as the initial value).
* win32_threads.c (GC_push_stack_for): Use WoW64 workaround only
if WOW64_THREAD_CONTEXT_WORKAROUND (instead of I386).
* win32_threads.c (GC_thr_init): Set isWow64 only if
WOW64_THREAD_CONTEXT_WORKAROUND (instead of I386).
include/private/gcconfig.h
win32_threads.c