Initial support of Xbox One (DURANGO) target
(part of commit
9379c66 from Unity-Technologies/bdwgc)
Issue #173 (bdwgc).
* include/private/gc_priv.h [THREADS && MSWIN_XBOX1] (GC_write_cs):
Declare.
* include/private/gcconfig.h [(_MSC_VER && _M_IX86 >= 300 || _WIN32)
&& _XBOX_ONE] (MSWIN_XBOX1): Define (instead of MSWIN32).
* include/private/gcconfig.h [X86_64 && MSWIN_XBOX1] (NO_GETENV,
DATASTART, DATAEND, STACKBOTTOM, GETPAGESIZE, USE_MMAP, PROT_NONE,
PROT_READ, PROT_WRITE, PROT_EXEC, MAP_PRIVATE, MAP_FIXED, MAP_FAILED):
Define.
* include/private/gcconfig.h [X86_64 && MSWIN_XBOX1]
(durango_get_stack_bottom): Declare external function.
* include/private/gcconfig.h [USE_MUNMAP && !MUNMAP_THRESHOLD
&& MSWIN_XBOX1] (MUNMAP_THRESHOLD): Define to 2; update comment.
* include/private/gcconfig.h [GC_WIN32_THREADS && !CYGWIN32
&& !MSWIN32 && !MSWINCE]: Do not issue #error if MSWIN_XBOX1.
* include/private/gcconfig.h [MSWIN_XBOX1] (durango_get_mem): Declare
function.
* include/private/gcconfig.h [MSWIN_XBOX1] (GET_MEM): Define.
* mark_rts.c [DYNAMIC_LOADING] (GC_cond_register_dynamic_libraries):
Do not call GC_remove_tmp_roots and GC_register_dynamic_libraries
if MSWIN_XBOX1 (set GC_no_dls to true instead).
* misc.c [MSWIN_XBOX1 && THREADS] (GC_write_cs): Define variable.
* misc.c [!MSWIN32 && !MSWINCE && !OS2 && !MACOS && !GC_ANDROID_LOG
&& !NN_PLATFORM_CTR && !NINTENDO_SWITCH && !AMIGA && !SN_TARGET_ORBIS
&& !__CC_ARM]: Do not include unistd.h if MSWIN_XBOX1.
* os_dep.c [!OS2 && !PCR && !AMIGA && !MACOS && !MSWINCE
&& !SN_TARGET_ORBIS && !__CC_ARM && !MSWIN32]: Likewise.
* os_dep.c [MMAP_SUPPORTED && MSWIN_XBOX1] (durango_get_mem): Define
new internal function.
* os_dep.c [!MSWINCE && USE_WINALLOC] (GLOBAL_ALLOC_TEST,
GC_mem_top_down, GC_win32_get_mem, GC_win32_free_heap): Do not define
if MSWIN_XBOX1.
* win32_threads.c [!CYGWIN32 && !MSWINCE] (GC_beginthreadex): Likewise.
* os_dep.c [USE_MUNMAP && !NN_PLATFORM_CTR && !MSWIN32 && !MSWINCE]:
Do not include unistd.h, sys/mman.h, sys/stat.h, sys/types.h if
MSWIN_XBOX1.
* win32_threads.c [GC_ASSERTIONS] (GC_write_disabled): Define only if
MSWIN32 or MSWINCE.
* win32_threads.c [GC_ASSERTIONS] (GC_stop_world): Do not use
GC_write_disabled if MSWIN_XBOX1.
* win32_threads.c [PARALLEL_MARK && !GC_PTHREADS_PARAMARK
&& MSWIN_XBOX1] (GC_start_mark_threads_inner): Use CreateThread()
instead of _beginthreadex().