portable-atomic

Portable atomic types including support for 128-bit atomics, atomic float, etc.

APACHE-2.0 License

Downloads
39.1M
Stars
107
Committers
7

Bot releases are visible (Hide)

portable-atomic - 0.3.15

Published by github-actions[bot] about 2 years ago

  • Implement workaround for std cpuid bug due to LLVM bug (rust-lang/rust#101346, llvm/llvm-project#57550).

    • Our use case is likely not affected, but we implement this just in case.
    • We've confirmed that the uses of inline assembly in this crate are not affected by this LLVM bug.
portable-atomic - 0.3.14

Published by github-actions[bot] about 2 years ago

  • Optimize atomic load/store on no-std pre-v6 ARM when portable_atomic_unsafe_assume_single_core cfg is used. (#36)

  • Support pre-power8 powerpc64le. powerpc64le's default cpu version is power8, but you can technically compile it for the old cpu using the unsafe -C target-cpu rustc flag.

portable-atomic - 0.3.13

Published by github-actions[bot] about 2 years ago

  • Use track_caller when debug assertions are enabled on Rust 1.46+.

  • Make powerpc64 128-bit atomics compatible with Miri and ThreadSanitizer on LLVM 15+.

  • Document that 128-bit atomics are compatible with Miri and ThreadSanitizer on recent nightly.

portable-atomic - 0.3.12

Published by github-actions[bot] about 2 years ago

  • Support atomic CAS on no-std pre-v6 ARM targets (e.g., thumbv4t-none-eabi) under unsafe cfg portable_atomic_unsafe_assume_single_core. (#28)
portable-atomic - 0.3.11

Published by github-actions[bot] about 2 years ago

  • Always provide atomic CAS for MSP430 and AVR. (#31)

    This previously required unsafe cfg portable_atomic_unsafe_assume_single_core, but since all MSP430 and AVR are single-core, we can safely provide atomic CAS based on disabling interrupts.

  • Support fence and compiler_fence on MSP430. (On MSP430, the standard library's fences are currently unavailable due to LLVM errors.)

  • Update safety requirements for unsafe cfg portable_atomic_unsafe_assume_single_core to mention use of privileged instructions to disable interrupts.

  • Atomic operations based on disabling interrupts on single-core systems are now considered lock-free.

    The previous behavior was inconsistent because we consider the pre-v6 ARM Linux's atomic operations provided in a similar way by the Linux kernel to be lock-free.

  • Respect -Zallow-features.

portable-atomic - 0.3.10

Published by github-actions[bot] about 2 years ago

  • Optimize aarch64 128-bit load when the lse target feature is enabled at compile-time. (#20)
portable-atomic - 0.3.9

Published by github-actions[bot] about 2 years ago

  • Fix build error on old Miri.

  • Documentation improvements.

portable-atomic - 0.3.8

Published by github-actions[bot] about 2 years ago

  • Make aarch64 and s390x 128-bit atomics compatible with Miri and ThreadSanitizer.
portable-atomic - 0.3.7

Published by github-actions[bot] about 2 years ago

  • Provide stable equivalent of #![feature(strict_provenance_atomic_ptr)]. (#23)

    • AtomicPtr::fetch_ptr_{add,sub}
    • AtomicPtr::fetch_byte_{add,sub}
    • AtomicPtr::fetch_{or,and,xor}

    These APIs are compatible with strict-provenance on cfg(miri). Otherwise, they are compatible with permissive-provenance.
    Once #![feature(strict_provenance_atomic_ptr)] is stabilized, these APIs will be strict-provenance compatible in all cases from the version in which it is stabilized.

  • Provide stable equivalent of #![feature(atomic_bool_fetch_not)]. (#24)

    • AtomicBool::fetch_not
  • Optimize x86_64 128-bit RMWs. (#22)

  • Optimize x86_64 outline-atomics.

  • Optimize inline assemblies on ARM and AArch64.

  • Revert thumbv6m atomic load/store changes made in 0.3.5. This is because rust-lang/rust#99595 has been reverted, so this is no longer needed.

portable-atomic - 0.3.6

Published by github-actions[bot] about 2 years ago

  • Fix build failure due to the existence of the specs directory.
  • Documentation improvements.
  • Optimize inline assemblies on x86_64, riscv, and msp430.
portable-atomic - 0.3.5

Published by github-actions[bot] about 2 years ago

  • Provide thumbv6m atomic load/store which is planned to be removed from the standard library in rust-lang/rust#99595. (#18)
portable-atomic - 0.3.4

Published by github-actions[bot] over 2 years ago

  • Optimize x86_64 128-bit atomic store.
portable-atomic - 0.3.3

Published by github-actions[bot] over 2 years ago

  • Allow CAS failure ordering stronger than success ordering. (#17)
portable-atomic - 0.3.2

Published by github-actions[bot] over 2 years ago

  • Optimize x86_64 128-bit atomic load/store on Intel CPU with AVX. (#16)

  • Support native 128-bit atomic operations for powerpc64 (le or pwr8+, currently nightly-only).

  • Fix behavior differences between stable and nightly. (#15)

portable-atomic - 0.3.1

Published by github-actions[bot] over 2 years ago

  • Optimize AArch64 128-bit atomic load/store when the lse2 target feature is enabled at compile-time. (#11)

  • Relax ordering in Debug impl to reflect std changes. (#12)

portable-atomic - 0.3.0

Published by github-actions[bot] over 2 years ago

  • Support native 128-bit atomic operations for s390x (currently nightly-only).

  • Add AtomicF{32,64}::fetch_abs.

  • Add #[must_use] to constructors.

  • Use 128-bit atomic operation mappings same as LLVM, on aarch64.

  • Remove parking_lot optional feature to allow the use of this crate within global allocators.

portable-atomic - 0.2.1

Published by github-actions[bot] over 2 years ago

  • Implement aarch64 outline-atomics.
portable-atomic - 0.2.0

Published by github-actions[bot] over 2 years ago

  • Remove i128 feature. Atomic{I,U}128 are now always enabled.

  • Add outline-atomics feature. Currently, this is the same as the 0.1's i128-dynamic, except that fallback feature is not implicitly enabled.

  • Remove i128-dynamic feature in favor of outline-atomics feature.

  • Add AtomicF{32,64}::as_bits.

portable-atomic - 0.1.4

Published by github-actions[bot] over 2 years ago

  • Support 128-bit atomics for aarch64 at Rust 1.59+. This was previously supported only on nightly. (#6)
portable-atomic - 0.1.3

Published by github-actions[bot] over 2 years ago

  • Fix inline assembly for riscv without A-extension.
Package Rankings
Top 5.23% on Crates.io
Badges
Extracted from project README
crates.io docs.rs license msrv github actions cirrus ci