Initial support of Sony PlayStation Portable 2
(part of commit
9379c66 from Unity-Technologies/bdwgc)
Issue #173 (bdwgc).
* alloc.c [!MACOS && !MSWINCE && !SN_TARGET_ORBIS && !__CC_ARM]:
Do not include sys/types.h if SN_TARGET_PSP2.
* dyn_load.c [!MACOS && !_WIN32_WCE && !SN_TARGET_ORBIS && !__CC_ARM]:
Likewise.
* os_dep.c [!OS2 && !PCR && !AMIGA && !MACOS && !MSWINCE
&& !SN_TARGET_ORBIS && !__CC_ARM]: Likewise.
* include/gc_config_macros.h [SN_TARGET_PSP2] (GC_THREADS): Define
macro.
* include/private/gcconfig.h [SN_TARGET_PSP2] (mach_type_known):
Likewise.
* include/private/gcconfig.h [ARM32 && SN_TARGET_PSP2] (NO_HANDLE_FORK,
DATASTART, DATAEND, STACKBOTTOM): Likewise.
* include/private/gcconfig.h [SN_TARGET_PSP2] (THREADS, GET_MEM):
Likewise.
* include/private/gc_locks.h [GC_PTHREADS && !GC_WIN32_THREADS
&& !SN_TARGET_ORBIS]: Do not include gc_atomic_ops.h if SN_TARGET_PSP2.
* include/private/gc_locks.h [SN_TARGET_PSP2]: Include psp2-support.h.
* include/private/gc_locks.h [SN_TARGET_PSP2] (GC_allocate_ml_PSP2):
Declare GC_EXTERN variable.
* include/private/gc_locks.h [SN_TARGET_PSP2] (UNCOND_LOCK,
UNCOND_UNLOCK): Define (using GC_allocate_ml_PSP2 instead of
GC_allocate_ml).
* include/private/gc_priv.h [!HBLKSIZE && (LARGE_CONFIG
|| !SMALL_CONFIG) && SN_TARGET_PSP2] (CPP_LOG_HBLKSIZE): Define to 16
(instead of 12).
* include/private/gcconfig.h [ARM32] (NOSYS): Do not define if
SN_TARGET_PSP2.
* os_dep.c (SBRK_ARG_T, OPT_MAP_ANON, GC_unix_mmap_get_mem,
GC_unix_sbrk_get_mem, GC_unix_get_mem): Likewise.
* pthread_support.c (GC_pthread_join, GC_pthread_detach,
GC_pthread_create): Likewise.
* include/private/gcconfig.h [ARM32 && SN_TARGET_PSP2]
(psp2_get_stack_bottom): Declare external function.
* include/private/gcconfig.h [SN_TARGET_PSP2] (psp2_get_mem): Likewise.
* include/private/gcconfig.h [USE_MUNMAP && !MUNMAP_THRESHOLD
&& SN_TARGET_PSP2] (MUNMAP_THRESHOLD): Define to 2.
* mach_dep.c: Skip everything in this file if SN_TARGET_PSP2.
* pthread_stop_world.c: Likewise.
* misc.c [SN_TARGET_PSP2] (GC_allocate_ml_PSP2): Define global varible
(instead of GC_allocate_ml).
* 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 SN_TARGET_PSP2.
* misc.c [SN_TARGET_PSP2] (GC_write): Define to no-op.
* pthread_support.c: Do not include sys/mman.h if SN_TARGET_PSP2.