Document GC_BUILTIN_ATOMIC macro (and gc_atomic_ops private header file)
authorIvan Maidanski <ivmai@mail.ru>
Tue, 28 Feb 2017 21:12:32 +0000 (00:12 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 28 Feb 2017 21:12:32 +0000 (00:12 +0300)
* 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).

doc/README.macros
doc/porting.html

index 90ef512..1b3c249 100644 (file)
@@ -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.)
 
index 751cbc5..8f74524 100644 (file)
@@ -265,15 +265,14 @@ with signals.  In this case, the changes involve:
 be automatically defined by <TT>gc_config_macros.h</tt> in the right cases.
 It should also result in a definition of <TT>GC_PTHREADS</tt>, as for the
 existing cases.
-<LI>For GC7+, ensuring that the <TT>atomic_ops</tt> package at least
+<LI>For GC v7, ensuring that the <TT>atomic_ops</tt> 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 <TT>atomic_ops</tt> port
 exists for the platform to provided an atomic test and set
-operation.  (Current GC7 versions require more<TT>atomic_ops</tt>
-support than necessary.  This is a bug.)  For earlier versions define
-<TT>GC_test_and_set</tt> in <TT>gc_locks.h</tt>.
+operation.  The latest GC code can use GCC atomic intrinsics instead of
+<TT>atomic_ops</tt> package (see <TT>include/private/gc_atomic_ops.h</tt>).
 <LI>Making any needed adjustments to <TT>pthread_stop_world.c</tt> and
 <TT>pthread_support.c</tt>.  Ideally none should be needed.  In fact,
 not all of this is as well standardized as one would like, and outright