haphazard
haphazard copied to clipboard
Use fastbarriers
Implements the light/heavy barriers using membarrier
.
Can you rebase onto master?
Codecov Report
Merging #25 (ed27d5b) into main (ba8ffcc) will not change coverage. The diff coverage is
100.00%
.
@@ Coverage Diff @@
## main #25 +/- ##
=======================================
Coverage 84.08% 84.08%
=======================================
Files 8 9 +1
Lines 817 817
=======================================
Hits 687 687
Misses 130 130
Impacted Files | Coverage Δ | |
---|---|---|
src/lib.rs | 30.37% <ø> (-3.36%) |
:arrow_down: |
src/record.rs | 100.00% <ø> (ø) |
|
src/domain.rs | 85.71% <100.00%> (ø) |
|
src/hazard.rs | 73.43% <100.00%> (ø) |
|
src/sync.rs | 100.00% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update ba8ffcc...ed27d5b. Read the comment docs.
Oh, I just pushed a change that re-adds the Miri isolation to make debugging easier. But I suppose we may have to re-disable it for this :thinking:
Hmmm, miri doesn't support the membarrier syscall. I guess it should just use a regular fence under cfg(miri) then?
Ah, yes, let's do that instead! I'd rather keep Miri's isolation if we can :+1:
It's arguably something that could be fixed in membarriers
actually — consider Miri a platform that doesn't support other barrier types.
Error: | = note: the
thumbv7m-none-eabi
target may not support the standard library = note:std
is required bywinapi
because it does not declare#![no_std]
This is odd, because winapi
is no_std :thinking:
It seems membarrier
is using an older winapi interface that presumably required std: https://github.com/jeehoonkang/membarrier-rs/issues/21. membarrier
seems to be unmaintained... maybe we should just inline it? cc @jeehoonkang
Hi! Thanks for your interest in the membarrier crate. I think I don't have enough bandwidth to address this issue myself, but I'm happy to accept PRs.
This is an old thread, but I did submit a PR for the membarrier crate to update the windows api used. We can wait to see if it gets merged, or we can do what DataDog did and just have a membarrier.rs with the relevant code since it's pretty small and I believe the licenses are compatible.
Edit: PR has been merged into master! Is there anything stopping this from getting merged/is it worth merging?
That's awesome! I'd still like to see this land, and I believe the change is pretty much good as-is and would just need a rebase + an update to the version number listed in Cargo.toml
to capture that change. @ibraheemdev you up for a quick touch-up of this PR?