diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2019-09-11 23:03:49 +0300 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2019-09-11 23:44:05 +0300 |
commit | d73c341351fff11b638a5d27168a24922077ce7f (patch) | |
tree | e3fe9d14829c23b1d94cec1d962b39a3026c9f60 /win32_threads.c | |
parent | a20818be9ec660588af325d82e515ebb75bd9905 (diff) | |
download | bdwgc-d73c341351fff11b638a5d27168a24922077ce7f.tar.gz |
Do not define GC_write_cs for Xbox One target
(fix of commit d16debf3e)
Issue #173 (bdwgc).
GC_write_cs is not used in GC_write thus there is no need to define
and use it in GC_stop_world.
* include/private/gc_priv.h [THREADS && MSWIN_XBOX1] (GC_write_cs):
Do not declare.
* misc.c [THREADS && MSWIN_XBOX1] (GC_write_cs): Do not define.
* win32_threads.c (GC_stop_world): Call EnterCriticalSection() and
LeaveCriticalSection() only if MSWIN32 or MSWINCE.
Diffstat (limited to 'win32_threads.c')
-rw-r--r-- | win32_threads.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/win32_threads.c b/win32_threads.c index f6049b39..dac29e10 100644 --- a/win32_threads.c +++ b/win32_threads.c @@ -1357,18 +1357,16 @@ GC_INNER void GC_stop_world(void) # if !defined(GC_NO_THREADS_DISCOVERY) || defined(GC_ASSERTIONS) GC_please_stop = TRUE; # endif -# ifndef CYGWIN32 -# ifndef MSWIN_XBOX1 - GC_ASSERT(!GC_write_disabled); -# endif +# if defined(MSWIN32) || defined(MSWINCE) + GC_ASSERT(!GC_write_disabled); EnterCriticalSection(&GC_write_cs); -# endif -# if defined(GC_ASSERTIONS) && (defined(MSWIN32) || defined(MSWINCE)) /* It's not allowed to call GC_printf() (and friends) here down to */ /* LeaveCriticalSection (same applies recursively to GC_suspend, */ /* GC_delete_gc_thread_no_free, GC_get_max_thread_index, GC_size */ /* and GC_remove_protection). */ - GC_write_disabled = TRUE; +# ifdef GC_ASSERTIONS + GC_write_disabled = TRUE; +# endif # endif # ifndef GC_NO_THREADS_DISCOVERY if (GC_win32_dll_threads) { @@ -1401,10 +1399,10 @@ GC_INNER void GC_stop_world(void) } } } -# if defined(GC_ASSERTIONS) && (defined(MSWIN32) || defined(MSWINCE)) - GC_write_disabled = FALSE; -# endif -# ifndef CYGWIN32 +# if defined(MSWIN32) || defined(MSWINCE) +# ifdef GC_ASSERTIONS + GC_write_disabled = FALSE; +# endif LeaveCriticalSection(&GC_write_cs); # endif # ifdef PARALLEL_MARK |