Fix a deadlock in write_fault_handler if AO_or is emulated
authorIvan Maidanski <ivmai@mail.ru>
Tue, 20 Nov 2018 21:19:20 +0000 (00:19 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 20 Nov 2018 21:19:20 +0000 (00:19 +0300)
commit016f30060f3c34a69387fa64e1f75f69057d57c0
tree5249a13d3708ec3143c9d0d8bca9f9b840f03310
parent70283bbb4590a386ab11201feb578ed50166f030
Fix a deadlock in write_fault_handler if AO_or is emulated

* configure.ac [$with_libatomic_ops!=none && $need_atomic_ops_asm!=true]
(HAVE_LOCKFREE_AO_OR): New AC_DEFINE (defined in case of success of
AC_TRY_LINK of a code snippet calling AO_or).
* include/private/gc_atomic_ops.h [GC_BUILTIN_ATOMIC
&& !NO_LOCKFREE_AO_OR] (HAVE_LOCKFREE_AO_OR): Define (to 1).
* include/private/gc_priv.h [THREADS] (GC_acquire_dirty_lock,
GC_release_dirty_lock): Define to no-op only if HAVE_LOCKFREE_AO_OR
or GC_DISABLE_INCREMENTAL.
* os_dep.c [!GC_DISABLE_INCREMENTAL] (async_set_pht_entry_from_index):
Use set_pht_entry_from_index_concurrent() only if HAVE_LOCKFREE_AO_OR
(or not THREADS).
configure.ac
include/private/gc_atomic_ops.h
include/private/gc_priv.h
os_dep.c