Samy Al Bahra
026bdd392f
Merge branch 'master' of git.concurrencykit.org:ck
12 years ago
Samy Al Bahra
d29ac5afdb
ck_bytelock: Fix downgrade path from writer to reader.
...
An off-by-one was introduced in downgrade path from writer.
This can cause deadlock if a writer downgrades from a write lock.
Pointed out by Jeffrey Birnbaum <jmb...@...>.
12 years ago
Samy Al Bahra
ca6637a57c
regressions/ck_pr: Utilize _GNU_SOURCE for ck_pr_store unit test.
12 years ago
Samy Al Bahra
3293cde2d2
regressions/common: Add missing header files in common.h
12 years ago
Samy Al Bahra
cb650246e2
regressions/ck_hp: Do not use empty loop body.
...
Fixes some GCC warnings in 4.7+.
12 years ago
Samy Al Bahra
c4149c72b4
ck_ring: Use regular assignment in type specialized ck_ring initialization.
12 years ago
Samy Al Bahra
0866206c1f
regressions/ck_ring: Add ck_ring_spmc to fast path test.
12 years ago
Samy Al Bahra
fbdc512304
regressions/ck_ring: Use variable for ring size.
12 years ago
Samy Al Bahra
89cb712ffa
ck_ring: Memoize mask across all operations.
12 years ago
Samy Al Bahra
8519aaf771
ck_ring: Memoize mask for SPMC operations.
12 years ago
Samy Al Bahra
b54ae5c4ac
ck_ring: Add a work-around for compiler bug(s) in ck_ring_dequeue_spmc.
...
Both LLVM-backed compilers and GCC incorrectly treat
a barrier-sandwiched load as a loop invariant in dequeue_spmc.
Forcing volatile atomic load semantics generates the right
thing.
Thanks to Devon O'Dell and Abel Mathew for help in catching
this issue.
12 years ago
Samy Al Bahra
0631e396e0
ck_backoff: Replace ck_backoff_eb with ck_backoff_gb.
...
The distinction between additive/exponential implementation
and geometric implementation does little but confuse users.
The terminology used in ck_backoff now reflects terminology
used in literature.
ck_backoff_gb has been removed.
12 years ago
Samy Al Bahra
d55e588ee4
regressions/ck_ring: Fix use of uninitialized data.
...
Execution history exists such that first thread will dequeue
from an uninitialized ring buffer. The unit test has been
(un)fortunate in that it would busy-wait during dequeue.
Full barrier semantics will enforce visibility.
Reported by: Maxime Henrion <mhenrion@gma....>.
12 years ago
Samy Al Bahra
900d203aa9
build: Bump version for next release.
12 years ago
Samy Al Bahra
b37ce19976
ck_pr/x86_64: GCC will attempt immediate expansion on double.
...
Break out double functionality to not use immediate expansion
at all.
Pointed out by Abel Mathew <amathew@appnexus...>.
12 years ago
Samy Al Bahra
1f13c75a66
regressions/ck_pr_store: Add coverage for double.
...
It appears GCC doesn't handle IMM constraint gracefully
for double. This isn't an issue with clang.
12 years ago
Samy Al Bahra
a052715ed9
Use correct license.
12 years ago
Samy Al Bahra
2429b2dc51
build: Bump version for next release.
12 years ago
Samy Al Bahra
3cc43c4229
ck_epoch: Skip current record if it is marked as free.
...
Pointed out by Matt Johnson <jonhso87@crhc...>.
12 years ago
Samy Al Bahra
0c56b1b8c6
ck_epoch: Remember to mark entry availability on unregister.
...
Pointed out by Matt Johnson (johnso87@crhc....>.
12 years ago
Samy Al Bahra
56bd0b7424
regressions/ck_fifo: cache align MPMC fifo.
12 years ago
Samy Al Bahra
93684f77c1
ck_pr: Use CK_CC_INLINE instead of inline keyword for ck_pr_barrier.
12 years ago
Samy Al Bahra
de0597d2aa
ck_bitmap: Add comment for ck_bitmap_size.
12 years ago
Samy Al Bahra
3f0a90813a
ck_ring: Unit test coverage for ck_ring_trydequeue.
12 years ago
Samy Al Bahra
849f938973
ck_ring: Add parameterized version of ck_ring_trydequeue.
12 years ago
Samy Al Bahra
7a99585f9e
ck_ring: No need for volatile load on dequeue_spmc.
12 years ago
Samy Al Bahra
01dc51db65
ck_ring: Add trydequeue variant.
12 years ago
Samy Al Bahra
a69649e580
build: Bump version for next release.
12 years ago
Samy Al Bahra
ca8be0858c
ck_pr: Re-include port selection logic.
12 years ago
Samy Al Bahra
1c7b8811c8
ck_pr/gcc: Remove useless assignment from volatile load.
12 years ago
Samy Al Bahra
a9ed19303f
ck_pr/gcc: Adopt const semantics for load/store in GCC port.
12 years ago
Samy Al Bahra
5c93ee3add
regressions: Do not use ck_error for debug output.
12 years ago
Samy Al Bahra
f1be36b6d2
regressions/ck_ring: Fix erroneous usage of ck_error.
12 years ago
Samy Al Bahra
6de54d6aa5
ck_pr/x86_64: Use correct target for load_64_2.
12 years ago
Samy Al Bahra
6bd946d019
regressions: Add ck_error convenience function.
...
Prints a message and then executes exit(EXIT_FAILURE).
12 years ago
Samy Al Bahra
12da4128ff
ck_pr: Adopt const qualifer for load/store.
...
We will adopt these semantics for the rest of _ptr
family at some point in the future as well.
12 years ago
Samy Al Bahra
90745e4d60
regressions/ck_ring: Silence GCC false positives.
12 years ago
Samy Al Bahra
911909ef31
regressions/ck_ring: Add ck_ring_spmc_template unit test.
12 years ago
Samy Al Bahra
055a7fd5db
ck_ring: Add wrapper functions for parameterized SPMC ring.
12 years ago
Samy Al Bahra
68b33e56d8
ck_ring: Add parameterized version of SPMC ring.
12 years ago
Samy Al Bahra
7f35cbee1b
ck_ring: Use SPSC enqueue as SPMC enqueue.
12 years ago
Samy Al Bahra
5d1d850f44
ck_ring: Adopt semantics identical to spmc counter semantics.
12 years ago
Samy Al Bahra
77a3bd3126
ck_ring: Move overflow check to producer side.
...
unsigned int-sized counters will be used on producer
and consumer side. This is necessary to allow a ring
to be used on multiple workloads.
12 years ago
Samy Al Bahra
d595bafea7
ck_ring: Serialize producer snapshot with respect to consumer.
12 years ago
Samy Al Bahra
b07c7808ce
regressions/ck_ring: Add strict fence around barrier and cache align ring.
12 years ago
Samy Al Bahra
d705e02b76
ck_ring: Replace MPMC variant with SPMC variant for starters.
...
Immediate use-case is SPMC. Next is MPSC, then I will generalize
to MPMC (unfortunately, I don't have an algorithm that avoids CAS2
yet for MPMC).
12 years ago
Samy Al Bahra
bb48f602ff
ck_ring: Add note regarding correctness so people don't both verifying it.
...
Original version is susceptible to several problems, it is whack.
12 years ago
Samy Al Bahra
8d90fa28ed
regressions/ck_ring: Add missing header file.
12 years ago
Samy Al Bahra
8d8f76845b
regressions/ck_ring: Add MPMC unit test.
12 years ago
Samy Al Bahra
68e6752e53
ck_ring: Due to popular request, add MPMC variants of enqueue/dequeue.
...
Fencing semantics are heavier-weight than they need to be.
12 years ago