Crates.io | atomic-memcpy |
lib.rs | atomic-memcpy |
version | 0.2.2 |
source | src |
created_at | 2022-01-29 10:12:02.429178 |
updated_at | 2023-08-19 07:18:20.860038 |
description | Byte-wise atomic memcpy. |
homepage | |
repository | https://github.com/taiki-e/atomic-memcpy |
max_upload_size | |
id | 523541 |
size | 67,288 |
Byte-wise atomic memcpy.
This is an attempt to implement equivalent of C++ "P1478: Byte-wise atomic memcpy" in Rust.
This is expected to allow algorithms such as Seqlock and Chase-Lev deque to be implemented without UB of data races. See P1478 for more.
atomic_load
is possible to produce an assembly roughly equivalent to the case of using volatile read + atomic fence on many platforms. (e.g., aarch64, riscv64. See tests/asm-test/asm
directory for more).atomic_load
for more.) It is possible that there is still room for improvement, especially on non-x86_64 platforms.AtomicMaybeUninit
is supported.Licensed under either of Apache License, Version 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.