diff options
author | Tim Cannell <timcannell@unity3d.com> | 2020-05-14 22:56:58 +0100 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2021-07-14 18:51:32 +0300 |
commit | 0b826a70191da9e1ea0012351f4bb2dedbe1ee17 (patch) | |
tree | 5e85002c8923e5d48bb83587d5a63f5b184c8c78 /misc.c | |
parent | f1007408a23e4dd97e202b0d7e8fed94bc019a56 (diff) | |
download | bdwgc-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 'misc.c')
-rw-r--r-- | misc.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -49,7 +49,7 @@ GC_INNER PCR_Th_ML GC_allocate_ml; # elif defined(SN_TARGET_PSP2) GC_INNER WapiMutex GC_allocate_ml_PSP2 = { 0, NULL }; -# elif defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PS3) +# elif defined(GC_DEFN_ALLOCATE_ML) || defined(SN_TARGET_PS3) # include <pthread.h> GC_INNER pthread_mutex_t GC_allocate_ml; # endif @@ -1729,7 +1729,7 @@ GC_API void GC_CALL GC_enable_incremental(void) #else -# if !defined(SN_TARGET_ORBIS) && !defined(SN_TARGET_PSP2) +# if !defined(GC_NO_TYPES) && !defined(SN_TARGET_PSP2) # if !defined(AMIGA) && !defined(MSWIN32) && !defined(MSWIN_XBOX1) \ && !defined(__CC_ARM) # include <unistd.h> @@ -1737,11 +1737,11 @@ GC_API void GC_CALL GC_enable_incremental(void) # if !defined(ECOS) && !defined(NOSYS) # include <errno.h> # endif -# endif /* !SN_TARGET_ORBIS && !SN_TARGET_PSP2 */ +# endif /* !GC_NO_TYPES && !SN_TARGET_PSP2 */ STATIC int GC_write(int fd, const char *buf, size_t len) { -# if defined(ECOS) || defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PSP2) \ +# if defined(ECOS) || defined(PLATFORM_WRITE) || defined(SN_TARGET_PSP2) \ || defined(NOSYS) # ifdef ECOS /* FIXME: This seems to be defined nowhere at present. */ |