Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AtomicPtr support #12

Open
thomcc opened this issue Oct 23, 2022 · 0 comments
Open

AtomicPtr support #12

thomcc opened this issue Oct 23, 2022 · 0 comments

Comments

@thomcc
Copy link

thomcc commented Oct 23, 2022

We have strict provenance APIs for AtomicPtr in the stdlib, but not in sptr.

I think its reasonably likely that the last two get renamed, since the name is rather misleading at the moment. It might be worth leaving them out, since they can be replicated in terms of fetch_byte_{add,sub} anyway.

I don't really know how to shim this best. The most "accurate" way would be in terms of fetch_update that uses with_addr in it's closure. But this would... kinda destroy performance. An approach that special-cases miri might be worth using.

I'll try to PR these next weekend I guess, but if someone else feels like taking it they should feel free.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant