Define GC_FREEBSD_THREADS and GC_ADD_CALLER macros for kFreeBSD
authorIvan Maidanski <ivmai@mail.ru>
Fri, 6 Apr 2018 05:59:22 +0000 (08:59 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 6 Apr 2018 05:59:22 +0000 (08:59 +0300)
* include/gc_config_macros.h [__FreeBSD_kernel__] (GC_FREEBSD_THREADS):
Define macro.
* include/gc_config_macros.h [__FreeBSD_kernel__
&& !GC_CAN_SAVE_CALL_STACKS] (GC_ADD_CALLER): Likewise.

include/gc_config_macros.h

index 7a58710..a043db8 100644 (file)
@@ -91,8 +91,8 @@
 #   define GC_HAIKU_THREADS
 # elif defined(__OpenBSD__)
 #   define GC_OPENBSD_THREADS
-# elif (defined(__FreeBSD__) && !defined(SN_TARGET_ORBIS)) \
-       || defined(__DragonFly__)
+# elif defined(__DragonFly__) || defined(__FreeBSD_kernel__) \
+       || (defined(__FreeBSD__) && !defined(SN_TARGET_ORBIS))
 #   define GC_FREEBSD_THREADS
 # elif defined(__NetBSD__)
 #   define GC_NETBSD_THREADS
 /* of compilers.                                                        */
 /* This may also be desirable if it is possible but expensive to        */
 /* retrieve the call chain.                                             */
-#if (defined(__linux__) || defined(__NetBSD__) || defined(__OpenBSD__) \
-     || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__HAIKU__) \
+#if (defined(__linux__) || defined(__DragonFly__) || defined(__FreeBSD__) \
+     || defined(__FreeBSD_kernel__) || defined(__HAIKU__) \
+     || defined(__NetBSD__) || defined(__OpenBSD__) \
      || defined(HOST_ANDROID) || defined(__ANDROID__)) \
     && !defined(GC_CAN_SAVE_CALL_STACKS)
 # define GC_ADD_CALLER