-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
We have strict provenance APIs for AtomicPtr in the stdlib, but not in sptr
.
AtomicPtr::fetch_and
AtomicPtr::fetch_or
AtomicPtr::fetch_xor
AtomicPtr::fetch_byte_add
AtomicPtr::fetch_byte_sub
AtomicPtr::fetch_ptr_add
AtomicPtr::fetch_ptr_sub
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.
WaffleLapkinjoseluis
Metadata
Metadata
Assignees
Labels
No labels