From: Christoph Egger <christoph@de...> - 2013-12-28 16:16:49
Please consider the attached patch. It enables CAS emulation on
systems, that do not have native CAS instructions (?!), which is, for
example, true on ARM < ARMv6
@@ -422,6 +422,7 @@ extern void cl_write_object(cl_object x, cl_object stream);
#endif /* ECL_THREADS */
+# define AO_REQUIRE_CAS
# ifdef ECL_LIBATOMIC_OPS_H
# include <ecl/atomic_ops.h>
From: Daniel Herring <dherring@te...> - 2014-02-21 23:57:59
On Sat, 28 Dec 2013, Christoph Egger wrote:
> Please consider the attached patch. It enables CAS emulation on
> systems, that do not have native CAS instructions (?!), which is, for
> example, true on ARM < ARMv6
How well is the CAS emulation working for you?
If this emulation has potential bugs or may not even compile, then it
would probably be better to require a separate configuration flag.
Something like --enable-cas-emulation.
Here's a snippet from the source tree that makes me think we do not want
to set AO_REQUIRE_CAS without explicit user consent.
This emulation is slow, since it needs to disable signals. And it needs to
block in case of contention. If you care about performance on a platform
that can't directly provide compare-and-swap, there are probably better