Samy Al Bahra
c197b37df1
legal: Update Copyright statements.
11 years ago
Samy Al Bahra
df571ad331
ck_spinlock: Migrate lock implementations to directory.
11 years ago
Samy Al Bahra
e6c0ef01a5
ck_spinlock: Revert previous change, do not splice too early.
11 years ago
Samy Al Bahra
e8b26ec212
ck_spinlock: Minor readability changes to ck_hclh.
11 years ago
Samy Al Bahra
c219593967
ck_spinlock: First round of improvements to ck_hclh.
...
* Drop unnecessary volatile stores.
* Use more expressive ck_pr_fence_X_Y semantics.
11 years ago
Samy Al Bahra
0e5ce1aae7
ck_spinlock: Simple whitespace changes (wrap long lines).
11 years ago
Olivier Houchard
0f92cbab08
ck_spinlock: Commit the missing HCLH bits.
11 years ago
Samy Al Bahra
2d4524dd3e
ck_spinlock: Retab (whitespace).
...
Accidentally had Haskell vim modeline set.
11 years ago
Samy Al Bahra
07aab518f6
ck_spinlock: Retab (whitespace).
11 years ago
Samy Al Bahra
ce142f17f8
ck_spinlock: Add ck_spinlock_mcs_init operation.
11 years ago
Samy Al Bahra
6bc9f7a485
ck_spinlock: Get rid of MCS context initializers.
...
They are unnecessary, legacy from older versions.
11 years ago
Samy Al Bahra
ec58f5dcf7
ck_spinlock: Add ck_spinlock_dec_init operation.
11 years ago
Samy Al Bahra
2f52ace54c
ck_spinlock: Fix strict aliasing issue in unlock (no-op).
...
For builds with -Werror. Not pointed out by Wez Furlong <wez@f....>.
12 years ago
Samy Al Bahra
f214d9419e
ck_spinlock: Move elision prototype to end of file.
12 years ago
Samy Al Bahra
59a1b53e86
ck_spinlock: Migrate to ck_elide.h.
...
Pending unit test updates.
12 years ago
Samy Al Bahra
0517a51b06
ck_spinlock: Weaken volatile store in clh_lock.
12 years ago
Samy Al Bahra
64b1201dcc
ck_spinlock: Acquire semantics for old locked operations.
...
Even though the intended use-case is for testing, developers
may want correctness guarantees in other situations.
12 years ago
Samy Al Bahra
a51c8c7aa6
ck_spinlock: Add ck_spinlock_clh_locked.
12 years ago
Samy Al Bahra
46d61ccd46
ck_spinlock: Add ck_spinlock_ticket_locked.
12 years ago
Samy Al Bahra
55decd0b38
ck_spinlock: Add ck_spinlock_anderson_locked.
12 years ago
Samy Al Bahra
a8a74b9f57
ck_spinlock: Remove erroneous mask usage for non-x86 targets.
12 years ago
Samy Al Bahra
045d0e1053
ck_spinlock: Apply modulo arithmetic to proportional back-off ticket lock.
12 years ago
Samy Al Bahra
a5e8d6ad45
ck_spinlock: Only enable trylock for ck_spinlock_ticket on x86*.
...
trylock algorithm semantics are not cleanly defined outside of x86.
12 years ago
Samy Al Bahra
2ba3f59374
ck_spinlock: Migrate MCS to ck_pr_fence_X_Y.
...
This includes fixing acquire semantics on mcs_lock fast path.
This represents an additional fence on the fast path for
acquire semantics post-acquisition.
12 years ago
Samy Al Bahra
8540821f3f
ck_spinlock: Minor style changes to return statement.
12 years ago
Samy Al Bahra
8face51e0d
ck_spinlock: Acquire semantics for anderson spinlock.
12 years ago
Samy Al Bahra
d09e48daed
ck_spinlock: Only enable trylock path for TSO architectures at the moment.
12 years ago
Samy Al Bahra
27d454248d
ck_spinlock: Add ticket lock with trylock operation.
...
Upon popular request, added a variant of the ticket spinlock
with trylock support. This is pending additional verification
on other architectures besides x86*. It is still unclear whether
this implementation will be the default as it is has slower
fast path.
Add trylock support to the ck_spinlock validation tests.
It currently only tests ck_spinlock_ticket_t trylock
functionality if available.
12 years ago
Samy Al Bahra
0598307186
whitespace: Various style changes.
12 years ago
Samy Al Bahra
33a9222923
legal: Update Copyright statements.
12 years ago
Samy Al Bahra
65ebf86799
ck_spinlock: Switch to full semantics across all implementations.
...
More importantly, trylock previously didn't have full semantics.
12 years ago
Samy Al Bahra
1d61147c01
ck_spinlock/mcs: Remove unnecessary fences, serialize unload.
12 years ago
Samy Al Bahra
79e336cfbc
ck_spinlock: Clarify ticket spinlock code.
...
Some people might be confused as far as lack of
fencing in the lock. Add a comment to clarify that
old values should not be equal to new values
of current position (where acquiring the current position
already has a global ordering).
12 years ago
Samy Al Bahra
27ed5f78fe
ck_spinlock: Remove unnecessary fence in DEC-based spinlock.
12 years ago
Samy Al Bahra
a7c4b9df65
ck_spinlock: Adopt RMO for anderson spinlock.
12 years ago
Samy Al Bahra
ce4cdd45c8
ck_spinlock: Adopt RMO semantics for CLH.
12 years ago
Samy Al Bahra
3cf265cba0
all: Strip trailing whitespaces.
13 years ago
Samy Al Bahra
706fd07de7
legal: Update Copyright statements.
13 years ago
Samy Al Bahra
1cefea7eb6
ck_spinlock: Provide a default implementation.
...
Several users in the past have noted it was difficult for them
to decide what spinlock implementation to use. In light of this,
a light-weight greedy default is chosen (currently ck_spinlock_fas).
13 years ago
Samy Al Bahra
0231b68a8b
ck_spinlock: Add ck_spinlock_*_locked.
...
This class of functions detects whether or not the
lock is currently acquired.
13 years ago
Samy Al Bahra
4e7c6ee270
Add full barrier for anderson spinlock.
13 years ago
Samy Al Bahra
38c614222a
ck_spinlock: Avoid modulus on unlock for power of 2 count.
14 years ago
Samy Al Bahra
492faed9a3
Reformatting changes for my new laptop.
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
d3a033237a
Avoid modulus for wrap-around calculation in ck_anderson.
...
This change has shown a 32% reduction in latency for the reference
SPARCv9 platform.
14 years ago
Samy Al Bahra
cbd30b2206
Initial import.
14 years ago