Samy Al Bahra
01dc51db65
ck_ring: Add trydequeue variant.
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
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
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
Samy Al Bahra
a06f28b77c
ck_ring: Remove useless comment.
12 years ago
Samy Al Bahra
955047a7d1
ck_{ring,fifo}: Add store fences while we lack load_store fences.
12 years ago
Samy Al Bahra
b1b19c1f74
ck_ring: Memory fence is overly pedantic for parameterized enqueue.
12 years ago
Samy Al Bahra
80c56d115b
ck_ring: Do not use volatile load for parametric ck_ring_size.
12 years ago
Samy Al Bahra
ad5e143bd5
ck_ring: Various improvements to readability.
...
No regressions in unit tests, so I'm dropping volatile
semantics for unnecessary volatile load/store on producer/consumer
side.
12 years ago
Samy Al Bahra
94c26494a6
ck_ring: Size is no longer necessary.
...
Patch submitted by Andrew Schorr.
12 years ago
Samy Al Bahra
3cf265cba0
all: Strip trailing whitespaces.
13 years ago
Samy Al Bahra
42b32c6e6a
ck_ring: Apply ck_ring_size logic to ck_ring_enqueue functions.
...
This bug fix was contributed by Matt Johnson <johnso87@...>.
13 years ago
Samy Al Bahra
706fd07de7
legal: Update Copyright statements.
13 years ago
Samy Al Bahra
5889498c16
ck_ring: Add modulo logic to ck_ring_size and CK_RING_SIZE.
14 years ago
Samy Al Bahra
88ee328b78
ck_ring: Add CK_RING_SIZE/CAPACITY and ck_ring_size/capacity.
...
ck_ring_size will return the current size of the ring while ck_ring_capacity
will return the capacity of the specified ring.
14 years ago
Samy Al Bahra
7c8ab13343
Some fixes for strict aliasing. Silence some warnings from clang.
14 years ago
Samy Al Bahra
66ebe1a874
Drop usage of CK_CC_PACKED, prefer natural alignment.
...
CK_CC_PACKED will drop structures to one-byte alignment in certain
cases. Obviously, this will mean bad performance on most architectures.
Thanks to Matt Johnson from https://rigel.crhc.illinois.edu/ for
reporting this problem.
14 years ago
Samy Al Bahra
cbd30b2206
Initial import.
14 years ago