Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
liblfds-temp
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
liblfds-temp
2y ago
Readability. C declarations can become unfriendly by being too complex and disordered.
2.
▲
by
liblfds-temp
2y ago
> I can't point you to the exact working in the intel docs as they are quite messy, but you can implement a perfectly C++11 compliant SPSC queue purely with load and stores on x86 without any fences or #LOCK operations. I would dis
3.
▲
by
liblfds-temp
2y ago
Mmm. Sort of the former, but really my thought was this : "you have a barrier, fine, but that does not mean once you hit/pass the barrier, all prior read/writes are complete - in fact, the completion of earlier reads/
4.
▲
by
liblfds-temp
2y ago
Declare all variables/qualifiers right-to-left. Read the type for all the below right-to-left, substituting the word "pointer" for "*". int long long unsigned wibble; // unsigned long long int double
5.
▲
by
liblfds-temp
2y ago
> On a cc system, once a store is no longer speculative, it is guaranteed to be flushed out of the store buffer into the cache, That's the thing - I may be wrong, but I'm under the impression store buffers do not guarantee an
6.
▲
by
liblfds-temp
2y ago
> You do not need a load barrier to observe stores from other cores. You need the load barrier so your own core does not reorder loads otherwise you could see wacky loads even if the stores are totally ordered. Yes. I mean, you need the
7.
▲
by
liblfds-temp
2y ago
> A barrier instruction forces all memory operations before it to complete before any memory operation after it can begin. That is, a barrier instruction effectively reinstates sequential consistency at a particular point in program exec
8.
▲
by
liblfds-temp
2y ago
A thread which performs a write, has a fence, and then performs another write, will at the time of the second write due to the fence guarantee the first write has completed. However, "completed" is misleading. The write will still
9.
▲
by
liblfds-temp
2y ago
> See how we added a new fence() call to put()? That fixes the reordering problem we’ve described at length. Now if the CPU gets bored waiting for entries[i] to be read into the cache, and tries to pull up the tail++ line so it happens s
10.
▲
by
liblfds-temp
3y ago
I know Samy. CK is extremely well made.
11.
▲
by
liblfds-temp
3y ago
I am the author of liblfds, a portable, license-free, lock-free data structure library written in C. I've been working on other projects for the last number of years, but I'm finally back to liblfds and making progress toward the