concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.35k stars 312 forks source link

Riscv support #169

Closed dangyajun closed 2 years ago

dangyajun commented 3 years ago

Is there any plan to support Riscv?

sbahra commented 3 years ago

Interested in this, it wouldn't take much work (my guess is up to a day). I'm a bit stretched on time but I am happy to help mentor someone do this. Do you know someone who could be interested in developing the port?

daniel-baumann commented 3 years ago

Hi,

ck 0.7.1 builds on riscv64, just the test-suite fails.

the buildlog is available at: https://buildd.debian.org/status/fetch.php?pkg=ck&arch=riscv64&ver=0.7.1-1&stamp=1627051253&raw=0

Regards, Daniel

jrtc27 commented 2 years ago

It should be working just fine with the compiler builtins. The only test suite failure I see in the Debian build log is:

ck_ec_smoke_test: ck_ec_smoke_test.c:170: test_deadline: Assertion `deadline_sec <= now_sec + 1 + 1000e-9' failed.

which looks like CLOCK_MONOTONIC not living up to its name (and not that the hardware is slow, even though that's true, since the assertion on the line above catches that case). All five subsequent uploads to Debian have successfully built.

So this can be closed IMO, unless you want to repurpose this issue for adding assembly implementations, but I would urge you not to bother, there's no real benefit for doing so, people should just be using C11 atomics (or the underlying intrinsics) except in the odd corner case.

sbahra commented 2 years ago

This should work now.