Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Unity-Technologies/bdwgc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortimcannell <timcannell@unity3d.com>2020-02-26 23:38:54 +0300
committertimcannell <timcannell@unity3d.com>2020-02-26 23:38:54 +0300
commit6a86542bd437ef46d683a3edc17ea078a02ef99e (patch)
tree6b6e6d2a1d3682c530048fc177b9330fb529869c /include
parent78e14e571951fdc228cd0d40e4c0c439004d6eed (diff)
extract platform defines to seperate values that can be set from the compiler
Diffstat (limited to 'include')
-rw-r--r--include/gc_config_macros.h4
-rw-r--r--include/private/gc_locks.h2
-rw-r--r--include/private/gc_priv.h2
-rw-r--r--include/private/gcconfig.h28
4 files changed, 19 insertions, 17 deletions
diff --git a/include/gc_config_macros.h b/include/gc_config_macros.h
index a043db8d..5a05253d 100644
--- a/include/gc_config_macros.h
+++ b/include/gc_config_macros.h
@@ -77,7 +77,7 @@
|| defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS) \
|| defined(GC_OSF1_THREADS) || defined(GC_SOLARIS_THREADS) \
|| defined(GC_WIN32_THREADS) || defined(GC_RTEMS_PTHREADS) \
- || defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PSP2)
+ || defined(SN_TARGET_PSP2)
# ifndef GC_THREADS
# define GC_THREADS
# endif
@@ -92,7 +92,7 @@
# elif defined(__OpenBSD__)
# define GC_OPENBSD_THREADS
# elif defined(__DragonFly__) || defined(__FreeBSD_kernel__) \
- || (defined(__FreeBSD__) && !defined(SN_TARGET_ORBIS))
+ || (defined(__FreeBSD__) && !defined(GC_NO_FREEBSD_THREADS))
# define GC_FREEBSD_THREADS
# elif defined(__NetBSD__)
# define GC_NETBSD_THREADS
diff --git a/include/private/gc_locks.h b/include/private/gc_locks.h
index 3c104192..f4d3e3f3 100644
--- a/include/private/gc_locks.h
+++ b/include/private/gc_locks.h
@@ -48,7 +48,7 @@
# endif
# if (!defined(AO_HAVE_test_and_set_acquire) || defined(GC_RTEMS_PTHREADS) \
- || defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PS3) \
+ || defined(SN_TARGET_PS3) \
|| defined(GC_WIN32_THREADS) || defined(LINT2)) && defined(GC_PTHREADS)
# define USE_PTHREAD_LOCKS
# undef USE_SPIN_LOCK
diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h
index 6acaabb4..aaf67d7f 100644
--- a/include/private/gc_priv.h
+++ b/include/private/gc_priv.h
@@ -835,7 +835,7 @@ EXTERN_C_BEGIN
# if defined(LARGE_CONFIG) || !defined(SMALL_CONFIG)
# ifdef ALPHA
# define CPP_LOG_HBLKSIZE 13
-# elif defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PSP2)
+# elif defined(SN_TARGET_PSP2)
# define CPP_LOG_HBLKSIZE 16 /* page size is set to 64K */
# else
# define CPP_LOG_HBLKSIZE 12
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index 7982ce39..cbe3ae9e 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -130,7 +130,7 @@ EXTERN_C_BEGIN
/* And one for FreeBSD: */
# if (defined(__FreeBSD__) || defined(__DragonFly__) \
|| defined(__FreeBSD_kernel__)) && !defined(FREEBSD) \
- && !defined(SN_TARGET_ORBIS) /* Orbis compiler defines __FreeBSD__ */
+ && !defined(GC_NO_FREEBSD)
# define FREEBSD
# endif
@@ -168,7 +168,7 @@ EXTERN_C_BEGIN
&& !defined(OPENBSD) && !defined(DARWIN) && !defined(_WIN32) \
&& !defined(__CEGCC__) && !defined(NN_PLATFORM_CTR) \
&& !defined(NN_BUILD_TARGET_PLATFORM_NX) \
- && !defined(SN_TARGET_ORBIS) && !defined(SN_TARGET_PSP2) \
+ && !defined(GC_NO_NOSYS) && !defined(SN_TARGET_PSP2) \
&& !defined(SYMBIAN)
# define NOSYS
# define mach_type_known
@@ -481,7 +481,7 @@ EXTERN_C_BEGIN
# define I386
# define mach_type_known
# endif
-# if (defined(FREEBSD) || defined(SN_TARGET_ORBIS)) \
+# if (defined(FREEBSD)) \
&& (defined(__amd64__) || defined(__x86_64__))
# define X86_64
# define mach_type_known
@@ -2565,14 +2565,14 @@ EXTERN_C_BEGIN
# ifndef CACHE_LINE_SIZE
# define CACHE_LINE_SIZE 64
# endif
-# ifdef SN_TARGET_ORBIS
+# ifdef PLATFORM_GETMEM
# define DATASTART (ptr_t)ALIGNMENT
# define DATAEND (ptr_t)ALIGNMENT
EXTERN_C_END
# include <pthread.h>
EXTERN_C_BEGIN
- void *ps4_get_stack_bottom(void);
-# define STACKBOTTOM ((ptr_t)ps4_get_stack_bottom())
+ void *platform_get_stack_bottom(void);
+# define STACKBOTTOM ((ptr_t)platform_get_stack_bottom())
# endif
# ifdef OPENBSD
# define OS_TYPE "OPENBSD"
@@ -3082,7 +3082,7 @@ EXTERN_C_BEGIN
/* The platform does not have a virtual paging system, so it does not */
/* have a large virtual address space that a standard x64 platform has. */
#if defined(USE_MUNMAP) && !defined(MUNMAP_THRESHOLD) \
- && (defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PS3) \
+ && (defined(SN_TARGET_PS3) \
|| defined(SN_TARGET_PSP2) || defined(MSWIN_XBOX1))
# define MUNMAP_THRESHOLD 2
#endif
@@ -3250,9 +3250,11 @@ EXTERN_C_BEGIN
#if defined(PCR) || defined(GC_WIN32_THREADS) || defined(GC_PTHREADS) \
|| defined(NN_PLATFORM_CTR) || defined(NINTENDO_SWITCH) \
- || defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PS3) \
+ || defined(SN_TARGET_PS3) \
|| defined(SN_TARGET_PSP2)
-# define THREADS
+ #if !defined(THREADS)
+ # define THREADS
+ #endif
#endif
#if defined(PARALLEL_MARK) && !defined(THREADS) && !defined(CPPCHECK)
@@ -3339,7 +3341,7 @@ EXTERN_C_BEGIN
#endif
#if defined(CAN_HANDLE_FORK) && !defined(CAN_CALL_ATFORK) \
- && !defined(HURD) && !defined(SN_TARGET_ORBIS) && !defined(HOST_TIZEN) \
+ && !defined(HURD) && !defined(GC_NO_CAN_CALL_ATFORK) && !defined(HOST_TIZEN) \
&& (!defined(HOST_ANDROID) || __ANDROID_API__ >= 21)
/* Have working pthread_atfork(). */
# define CAN_CALL_ATFORK
@@ -3574,9 +3576,9 @@ EXTERN_C_BEGIN
SIZET_SAT_ADD(bytes, \
GC_page_size)) \
+ GC_page_size-1)
-# elif defined(SN_TARGET_ORBIS)
- void *ps4_get_mem(size_t bytes);
-# define GET_MEM(bytes) (struct hblk*)ps4_get_mem(bytes)
+# elif defined(PLATFORM_GETMEM)
+ void *platform_get_mem(size_t bytes);
+# define GET_MEM(bytes) (struct hblk*)platform_get_mem(bytes)
# elif defined(SN_TARGET_PS3)
void *ps3_get_mem(size_t bytes);
# define GET_MEM(bytes) (struct hblk*)ps3_get_mem(bytes)