Annotate fall through cases in switch statements where that behavior is
desirable to quiet compiler warnings with the -Wimplicit-fallthrough
flag. The annotation format used is supported by both GCC and Clang.
Fixes#108.
Memoize the map into ck_hs_iterator_t to make iteration more safe in the face of growth or shrinkage of the map. Tests for same.
Work from Riley Berton.
With preemption, it is possible for _ck_ring_enqueue_mp to have a
snapshot of p_head so stale with respect to the later snapshot of
c_head that a comparison modulo (small) ring size will erroneously
conclude that the ring is full.
Detect that case and retry rather than failing. We only retry when
the enqueuers have made global forward progress, so the first loop
is as lock-free as it ever was.
Bonus: the new condition should be marginally faster.
expr as provided by busybox doesn't know about --, while most other
implementations require it, or it'd try to interpret --prefix=whatever as
one of its own options. To fix this, we just remove the first two characters
of the option before calling expr, rendering -- useles.
This is in preparation for upcoming work for allowing record sharing.
The write-side operations rely only on global state. Future work, we can play
tricks by caching latest call epoch while still building on the core EBR
concept.
An idle grace period requires all threads to be idle. This optimization
introduced a regression with idle detection if subset of threads are
both active and idle. Unfortunately, none of our test machines detected
the problem.
This issue was reported by Julie Zhao <julie.zhao@sparkpos....>
Add a new configure option, --enable-lse, which is only effective for
the AArch64 architecture. When used, most ck_pr_* atomics will use Large
System Extensions instructions as per the ARMv8.1 specification, rather
then LL/SC instruction pairs.