SET(LIBS ${LIBS} ${Threads_LIBRARIES})
ENDIF(enable_threads)
-OPTION(enable_parallel_mark "Parallelize marking and free list construction" NO)
+OPTION(enable_parallel_mark "Parallelize marking and free list construction" ON)
#IF(Threads_FOUND)
# ADD_DEFINITIONS("")
# MESSAGE("Parallel mark requires enable_threads ON" )
#ENDIF(Threads_FOUND)
-IF(enable_parallel_mark)
- ADD_DEFINITIONS("-DPARALLEL_MARK")
-ENDIF(enable_parallel_mark)
-
OPTION(enable_cplusplus "install C++ support" NO)
SET(_HOST ${CMAKE_HOST_SYSTEM_PROCESSOR}--${CMAKE_SYSTEM}) #FIXME missing the vendor field.Use lowercase
IF( HOST MATCHES x86-.*-linux.*|ia64-.*-linux.*|i586-.*-linux.*|i686-.*-linux.*|x86_64-.*-linux.*|alpha-.*-linux.*|sparc.*-.*-linux.*)
ADD_DEFINITIONS("-DGC_LINUX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
SET(SRC ${SRC} thread_local_alloc.c)
MESSAGE("Explicit GC_INIT() calls may be required.")
IF ( HOST MATCHES .*-.*-linux.*)
ADD_DEFINITIONS("-DGC_LINUX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ENDIF()
IF ( HOST MATCHES .*-.*-aix.*)
ADD_DEFINITIONS("-DGC_AIX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ENDIF()
IF ( HOST MATCHES .*-.*-hpux11.*)
MESSAGE("Only HP/UX 11 POSIX threads are supported.")
ADD_DEFINITIONS("-D_POSIX_C_SOURCE=199506L") #TODO test -DVAR=value. Alternative is COMPILE_DEFINITIONS property
MESSAGE("Explicit GC_INIT() calls may be required.")
ADD_DEFINITIONS("-D_REENTRANT") #TODO
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ENDIF()
IF ( HOST MATCHES .*-.*-hpux10.*)
MESSAGE("Only HP/UX 11 POSIX threads are supported.")
ENDIF()
IF ( HOST MATCHES .*-.*-openbsd.*)
ADD_DEFINITIONS("-DGC_OPENBSD_THREADS")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ENDIF()
IF ( HOST MATCHES .*-.*-freebsd.*)
MESSAGE("FreeBSD does not yet fully support threads with Boehm GC.")
ADD_DEFINITIONS("-DGC_FREEBSD_THREADS")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ENDIF()
IF ( HOST MATCHES .*-.*-kfreebsd.*-gnu)
ADD_DEFINITIONS("-DGC_FREEBSD_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
ADD_DEFINITIONS("-DUSE_COMPILER_TLS")
SET(SRC ${SRC} thread_local_alloc.c)
IF ( HOST MATCHES .*-.*-gnu.*)
ADD_DEFINITIONS("-DGC_GNU_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
SET(SRC ${SRC} thread_local_alloc.c)
ENDIF()
ADD_DEFINITIONS("-DGC_NETBSD_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
ADD_DEFINITIONS("-D_PTHREADS")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ENDIF()
IF ( HOST MATCHES .*-.*-solaris.*)
ADD_DEFINITIONS("-DGC_SOLARIS_THREADS")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
SET(SRC ${SRC} thread_local_alloc.c)
#TODO
ENDIF()
IF ( HOST MATCHES .*-.*-irix.*)
ADD_DEFINITIONS("-DGC_IRIX_THREADS")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ENDIF()
IF ( HOST MATCHES .*-.*-cygwin.*)
ADD_DEFINITIONS("-DGC_THREADS")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
SET(SRC ${SRC} thread_local_alloc.c)
#TODO
ENDIF()
IF ( HOST MATCHES .*-.*-darwin.*)
ADD_DEFINITIONS("-DGC_DARWIN_THREADS")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
MESSAGE("Explicit GC_INIT() calls may be required.")
SET(SRC ${SRC} darwin_stop_world.c thread_local_alloc.c)
IF ( HOST MATCHES .*-.*-osf*)
ADD_DEFINITIONS("-DGC_OSF1_THREADS")
IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
SET(SRC ${SRC} thread_local_alloc.c)
MESSAGE("Explicit GC_INIT() calls may be required.")
IF ( HOST MATCHES .*-.*-linux.*)
ADD_DEFINITIONS("-DGC_LINUX_THREADS")
ADD_DEFINITIONS("-D_REENTRANT")
+ IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
+ ENDIF(enable_parallel_mark)
ENDIF()
ENDIF(CMAKE_USE_PTHREADS_INIT)
ADD_DEFINITIONS("-DGC_THREADS")
#win32_threads=true TODO
IF(enable_parallel_mark)
+ ADD_DEFINITIONS("-DPARALLEL_MARK")
ADD_DEFINITIONS("-DTHREAD_LOCAL_ALLOC")
SET(SRC ${SRC} thread_local_alloc.c)
ENDIF()
AC_MSG_WARN("Only HP/UX 11 POSIX threads are supported.")
AC_DEFINE(GC_HPUX_THREADS)
AC_DEFINE(_POSIX_C_SOURCE,199506L)
- if test "${enable_parallel_mark}" = yes; then
+ if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
AC_MSG_WARN("FreeBSD does not yet fully support threads with Boehm GC.")
AC_DEFINE(GC_FREEBSD_THREADS)
AM_CFLAGS="$AM_CFLAGS -pthread"
- if test "${enable_parallel_mark}" = yes; then
+ if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
AM_CFLAGS="$AM_CFLAGS -pthread"
THREADDLLIBS=-pthread
AC_DEFINE(_REENTRANT)
- if test "${enable_parallel_mark}" = yes; then
+ if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)
;;
*-*-osf*)
AC_DEFINE(GC_OSF1_THREADS)
- if test "${enable_parallel_mark}" = yes; then
+ if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
AC_DEFINE(THREAD_LOCAL_ALLOC)
AC_MSG_WARN("Explicit GC_INIT() calls may be required.");
- # May want to enable it in other cases, too.
- # Measurements have not yet been done.
fi
AM_CFLAGS="$AM_CFLAGS -pthread"
THREADDLLIBS="-lpthread -lrt"
AC_MSG_RESULT($THREADDLLIBS)
# Use pthread GCC switch
THREADDLLIBS=-pthread
- if test "${enable_parallel_mark}" = yes; then
+ if test "${enable_parallel_mark}" != no; then
AC_DEFINE(PARALLEL_MARK)
fi
AC_DEFINE(THREAD_LOCAL_ALLOC)