From: Ivan Maidanski Date: Tue, 28 Feb 2017 21:12:32 +0000 (+0300) Subject: Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file) X-Git-Tag: v8.0.0~901 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9cef30591d906e03641fa531d898be17a89c1fd3;p=gc Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file) * doc/README.macros (GC_BUILTIN_ATOMIC): Document. * doc/porting.html (atomic_ops): Replace GC7+ with GC v7; remove note that libatomic_ops contains more primitives than needed by GC; remove note about GC_test_and_set of older GC versions (pre-v7); add note about gc_atomic_ops.h file (optional replacement of libatomic_ops). --- diff --git a/doc/README.macros b/doc/README.macros index 90ef5128..1b3c2499 100644 --- a/doc/README.macros +++ b/doc/README.macros @@ -400,6 +400,9 @@ GC_ATTR_TLS_FAST Use specific attributes for GC_thread_key like PARALLEL_MARK Allows the marker to run in multiple threads. Recommended for multiprocessors. +GC_BUILTIN_ATOMIC Use C11 (GCC) atomic intrinsics instead of + libatomic_ops primitives. + GC_ALWAYS_MULTITHREADED Force multi-threaded mode at GC initialization. (Turns GC_allow_register_threads into a no-op routine.) diff --git a/doc/porting.html b/doc/porting.html index 751cbc59..8f745245 100644 --- a/doc/porting.html +++ b/doc/porting.html @@ -265,15 +265,14 @@ with signals. In this case, the changes involve: be automatically defined by gc_config_macros.h in the right cases. It should also result in a definition of GC_PTHREADS, as for the existing cases. -
  • For GC7+, ensuring that the atomic_ops package at least +
  • For GC v7, ensuring that the atomic_ops package at least minimally supports the platform. If incremental GC is needed, or if pthread locks don't perform adequately as the allocation lock, you will probably need to ensure that a sufficient atomic_ops port exists for the platform to provided an atomic test and set -operation. (Current GC7 versions require moreatomic_ops -support than necessary. This is a bug.) For earlier versions define -GC_test_and_set in gc_locks.h. +operation. The latest GC code can use GCC atomic intrinsics instead of +atomic_ops package (see include/private/gc_atomic_ops.h).
  • Making any needed adjustments to pthread_stop_world.c and pthread_support.c. Ideally none should be needed. In fact, not all of this is as well standardized as one would like, and outright