summaryrefslogtreecommitdiff
path: root/extra
diff options
context:
space:
mode:
authorTim Cannell <timcannell@unity3d.com>2020-05-14 22:56:58 +0100
committerIvan Maidanski <ivmai@mail.ru>2021-07-14 18:51:32 +0300
commit0b826a70191da9e1ea0012351f4bb2dedbe1ee17 (patch)
tree5e85002c8923e5d48bb83587d5a63f5b184c8c78 /extra
parentf1007408a23e4dd97e202b0d7e8fed94bc019a56 (diff)
downloadbdwgc-0b826a70191da9e1ea0012351f4bb2dedbe1ee17.tar.gz
Replace SN_TARGET_ORBIS to PLATFORM_* and GC_NO_* macros
(cherry-pick of 6a86542, 366aaf6, f3b34f4 from Unity-Technologies/bdwgc) SN_TARGET_ORBIS macro is replaced (almost) with GC_NO_CAN_CALL_ATFORK, GC_NO_FREEBSD, GC_NO_NOSYS, GC_NO_TYPES, PLATFORM_GC_REG_STORAGE_SIZE, PLATFORM_GETMEM, PLATFORM_MACH_DEP, PLATFORM_STOP_WORLD, PLATFORM_WRITE ones. * alloc.c [!MACOS && !MSWINCE && !SN_TARGET_PSP2]: Test GC_NO_TYPES macro instead of SN_TARGET_ORBIS. * misc.c [!MSWIN32 && !MSWINCE && !OS2 && !MACOS && !GC_ANDROID_LOG && !NN_PLATFORM_CTR && !NINTENDO_SWITCH && !SN_TARGET_PSP2 && !AMIGA && !MSWIN32 && !MSWIN_XBOX1 && !__CC_ARM]: Likewise. * dyn_load.c [MACOS && !SN_TARGET_PSP2 && !_WIN32_WCE && !__CC_ARM]: Likewise. * extra/gc.c [PLATFORM_MACH_DEP]: Do not include mach_dep.c file. * extra/gc.c [PLATFORM_STOP_WORLD]: Do not include pthread_stop_world.c file. * include/gc_config_macros.h [__DragonFly__ || __FreeBSD_kernel__ || __FreeBSD__]: Do not define GC_FREEBSD_THREADS if GC_NO_FREEBSD. * include/private/gc_locks.h [GC_PTHREADS]: Do not test SN_TARGET_ORBIS macro. * include/private/gc_priv.h [!HBLKSIZE && (LARGE_CONFIG || !SMALL_CONFIG)]: Likewise. * include/private/gcconfig.h [USE_MUNMAP && !MUNMAP_THRESHOLD] (MUNMAP_THRESHOLD): Likewise. * include/private/gcconfig.h [GC_THREADS] (THREADS): Likewise. * include/private/gcconfig.h [(__FreeBSD__ || __DragonFly__ || __FreeBSD_kernel__) && !FREEBSD] (FREEBSD): Test GC_NO_FREEBSD macro instead of SN_TARGET_ORBIS. * include/private/gcconfig.h [(__arm || __arm__ || __thumb__) && !NACL && !LINUX && !NETBSD && !FREEBSD && !OPENBSD && !DARWIN && !_WIN32 && !__CEGCC__ && !NN_PLATFORM_CTR && !SN_TARGET_PSP2 && !SYMBIAN] (NOSYS): Test GC_NO_NOSYS macro instead of SN_TARGET_ORBIS. * include/private/gcconfig.h [SN_TARGET_ORBIS && (__amd64__ || __x86_64__)] (X86_64): Do not define. * include/private/gcconfig.h [X86_64]: Test PLATFORM_GETMEM macro instead of SN_TARGET_ORBIS. * include/private/gcconfig.h [X86_64 && PLATFORM_GETMEM] (OS_TYPE): Update value. * include/private/gcconfig.h [X86_64 && PLATFORM_GETMEM]: Include pthread.h. * include/private/gcconfig.h [X86_64 && PLATFORM_GETMEM]: Declare platform_get_stack_bottom() instead of ps4_get_stack_bottom(). * include/private/gcconfig.h [X86_64 && PLATFORM_GETMEM] (STACKBOTTOM): Use platform_get_stack_bottom(). * include/private/gcconfig.h [CAN_HANDLE_FORK && !CAN_CALL_ATFORK !HOST_TIZEN && !HURD] (CAN_CALL_ATFORK): Test GC_NO_CAN_CALL_ATFORK macro instead of SN_TARGET_ORBIS. * include/private/gcconfig.h [GC_PRIVATE_H]: Test PLATFORM_GETMEM macro instead of SN_TARGET_ORBIS. * include/private/gcconfig.h [GC_PRIVATE_H && PLATFORM_GETMEM] (platform_get_mem): Declare (instead of ps4_get_mem). * include/private/gcconfig.h [GC_PRIVATE_H && PLATFORM_GETMEM] (GET_MEM): Use platform_get_mem(). * include/private/pthread_stop_world.h [!GC_OPENBSD_UTHREADS && !NACL && !SN_TARGET_PSP2] (thread_stop_info.last_stop_count): Test PLATFORM_STOP_WORLD macro instead of SN_TARGET_ORBIS. * pthread_stop_world.c [GC_PTHREADS && !GC_WIN32_THREADS && !GC_DARWIN_THREADS]: Likewise. * include/private/pthread_stop_world.h [!NACL]: Test PLATFORM_HAVE_GC_REG_STORAGE_SIZE macro instead of SN_TARGET_ORBIS. * include/private/pthread_stop_world.h [!NACL && PLATFORM_HAVE_GC_REG_STORAGE_SIZE] (ORBIS_GC_REG_STORAGE_SIZE): Do not define. * include/private/pthread_stop_world.h [!NACL && PLATFORM_HAVE_GC_REG_STORAGE_SIZE] (thread_stop_info.registers): Use PLATFORM_GC_REG_STORAGE_SIZE instead of ORBIS_GC_REG_STORAGE_SIZE. * mach_dep.c [!SN_TARGET_PSP2]: Test PLATFORM_MACH_DEP macro instead of SN_TARGET_ORBIS. * misc.c [THREADS && !PCR && !SN_TARGET_PSP2] (GC_allocate_ml): Test GC_DEFN_ALLOCATE_ML macro instead of SN_TARGET_ORBIS. * misc.c [!MSWIN32 && !MSWINCE && !OS2 && !MACOS && !GC_ANDROID_LOG && !NN_PLATFORM_CTR && !NINTENDO_SWITCH] (GC_write): Test PLATFORM_WRITE macro instead of SN_TARGET_ORBIS.
Diffstat (limited to 'extra')
-rw-r--r--extra/gc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/extra/gc.c b/extra/gc.c
index 8e2446a2..4f907a8a 100644
--- a/extra/gc.c
+++ b/extra/gc.c
@@ -67,8 +67,12 @@
#include "../darwin_stop_world.c"
#include "../dyn_load.c"
#include "../gc_dlopen.c"
-#include "../mach_dep.c"
-#include "../pthread_stop_world.c"
+#if !defined(PLATFORM_MACH_DEP)
+# include "../mach_dep.c"
+#endif
+#if !defined(PLATFORM_STOP_WORLD)
+# include "../pthread_stop_world.c"
+#endif
#include "../pthread_support.c"
#include "../specific.c"
#include "../win32_threads.c"