Skip to content

Releases: taiki-e/portable-atomic

1.10.0

23 Nov 21:11
Compare
Choose a tag to compare
  • Update to stabilized s390x and Arm64EC inline assembly. (97645c1, e1d1a97)

  • Make get_mut const fn on Rust 1.83+. (0dea68c)

  • Make from_ptr const fn on Rust 1.83+. (align to the std atomic change in Rust 1.84) (50532d8)

  • Various optimizations:

    • RISC-V without A-extension: Optimize 16-bit fetch_not when Zabha enabled. (a487a09)
    • s390x: Optimize 128-bit CAS/RMW. (fba028d, 33ab2c1)
    • PowerPC64: Optimize 128-bit Acquire/AcqRel/SeqCst CAS/RMW and 128-bit CAS with Relaxed failure ordering. (33ab2c1)
    • AVR: Optimize 8-bit load/store. (33ab2c1)
  • Improve support of run-time detection and outline-atomics:

    • Enable run-time detection by default on powerpc64 and aarch64 linux-uclibc. (#193)
    • Improve run-time detection of powerpc64 quadword-atomics. (1e3bfda)
    • Improve run-time detection of Zhaoxin CPU. (f283d2a)
  • Support RISC-V Zacas extension on pre-1.82 rustc. (#194)

  • Improve compile-time detection of RISC-V Zaamo/Zabha extensions. (673137a)

  • Respect RUSTC_BOOTSTRAP=-1 recently added in nightly in rustc version detection. (5b2847a)

portable-atomic-util 0.2.4

23 Nov 05:17
Compare
Choose a tag to compare

portable-atomic-util 0.2.3

17 Oct 16:11
Compare
Choose a tag to compare

1.9.0

28 Sep 06:01
Compare
Choose a tag to compare
  • RISC-V without A-extension: Support RMW when Zaamo extension enabled (even when unsafe-assume-single-core disabled). (#185, 9983a8b)
    See "operations don't require disabling interrupts" list in interrupt module's readme for the operations provided.

  • Support run-time detection of RISC-V Zacas extension (currently disabled by default). (#183)

  • Support 128-bit atomics on Arm64EC (currently nightly-only) (#184)

  • Improve compile-time detection of powerpc64 quadword-atomics. (3eb8507)

1.8.0

20 Sep 14:19
Compare
Choose a tag to compare
  • Improve diagnostics when method that requires CAS is unavailable. (#181)

    Before:

    error[E0599]: no method named `compare_exchange` found for struct `portable_atomic::AtomicUsize` in the current scope
      --> src/race.rs:60:24
       |
    60 |             self.inner.compare_exchange(0, value.get(), Ordering::AcqRel, Ordering::Acquire);
       |                        ^^^^^^^^^^^^^^^^ method not found in `AtomicUsize`
    

    After:

    error[E0277]: `compare_exchange` requires atomic CAS but not available on this target by default
        --> src/race.rs:60:24
         |
    60   |             self.inner.compare_exchange(0, value.get(), Ordering::AcqRel, Ordering::Acquire);
         |                        ^^^^^^^^^^^^^^^^ this associated function is not available on this target by default
         |
         = help: the trait `HasCompareExchange` is not implemented for `&portable_atomic::AtomicUsize`
         = note: consider enabling one of the `unsafe-assume-single-core` or `critical-section` Cargo features
         = note: see <https://docs.rs/portable-atomic/latest/portable_atomic/#optional-features> for more.
    
  • Improve compile error messages for some other cases (19716ac, 61dcaaa)

  • Various improvements to RISC-V.

    • riscv64: Support 128-bit atomics when Zacas extension enabled. (173) This is currently marked as experimental because LLVM marking the corresponding target feature as experimental.
    • riscv32: Support 64-bit atomics when Zacas extension enabled. (173) This is currently marked as experimental because LLVM marking the corresponding target feature as experimental.
    • Improvements for RISC-V without A-extension:
      • Support zaamo target feature. When building for single-core RISC-V without A-extension, this is equivalent to force-amo feature (8abba4b)
      • Support zabha target feature. (694364a)
      • Strengthen SeqCst store to improve compatibility with code that uses atomic instruction mapping that differs from LLVM and GCC. (5b10b15)
  • Improve support of run-time detection and outline-atomics:

    • aarch64: Support run-time detection of FEAT_LRCPC3/FEAT_LSE128 for load/store. (#174)
    • aarch64: Support run-time detection of FEAT_LSE2 on OpenBSD. (4f8c735)
    • aarch64: Support run-time detection of FEAT_LSE/FEAT_LSE2 on illumos (currently disabled by default because illumos AArch64 port is experimental). (#175)
    • powerpc64: Support run-time detection on OpenBSD 7.6+ (currently disabled by default for compatibility with old versions). (09a967b)
  • aarch64: Support FEAT_LRCPC3/FEAT_LSE128 with pre-16 LLVM. (#178)

  • aarch64: Improve compile-time detection of FEAT_LSE2/FEAT_LRCPC3/FEAT_LSE128. (10d47de)

  • Relax minimal version of serde (supported via optional feature) to 1.0.60.

1.7.0

19 Jul 22:04
Compare
Choose a tag to compare
  • Support run-time detection for cmpxchg16b on x86_64 on pre-1.69 rustc. (#154)

  • Make into_inner const fn on Rust 1.56+. (align to the std atomic change in Rust 1.79) (dee1f89)

  • Work around rustc_codegen_gcc bug on x86_64. (d938f77)

  • Optimize x86_64 atomics.

    • Optimize 128-bit load/store on Zhaoxin CPU with AVX. (86cee8f)
    • Optimize 128-bit SeqCst store on Intel/AMD/Zhaoxin CPU with AVX. (#156, 0483042)
    • Remove needless test in CAS. (573e025)
  • Make rustc version detection robust for custom toolchains. (f8ea85e)

  • Respect RUSTC_WRAPPER in rustc version detection.

  • Our build script is now less likely to be re-run unnecessarily in versions where the cargo bug fix is available (cargo 1.79+). (52c277b)

portable-atomic-util 0.2.2

12 Jul 17:08
Compare
Choose a tag to compare

portable-atomic-util 0.2.1

22 Jun 05:29
Compare
Choose a tag to compare
  • Support impl Error for Arc<T: Error> in no-std at Rust 1.81+. (30b9f90)

  • Implement Default for Arc<[T]> and Arc<str> at Rust 1.51+. (align to the std Arc change in Rust 1.80) (c6ee296)

  • Implement {AsFd, AsRawFd} for Arc<T> on HermitOS. (b778244)

portable-atomic-util 0.2.0

07 May 06:18
Compare
Choose a tag to compare
  • Rewrite Arc based on std::sync::Arc's implementation. (#142)

    This fixes accidental API differences with std (#139, #140) and adds many missing APIs compared to std:

    • Add Arc::{downcast, into_inner, make_mut, new_cyclic} (#142)
    • Implement {fmt::Display, fmt::Pointer, Error, From<T>, From<Box<T>>, From<Cow<'a,T>>, AsFd, AsRawFd, AsHandle, AsSocket} for Arc<T> (#142, 78690d7, aba0930)
    • Implement {From<&[T]>, From<Vec<T>>, From<[T; N]>, FromIterator<T>} for Arc<[T]> (#142, 5e9f693)
    • Implement TryFrom<Arc<[T]>> for Arc<[T; N]> (#142)
    • Implement From<Arc<str>> for Arc<[u8]> (#142)
    • Implement {From<&str>, From<String>} for Arc<str> (#142)
    • Implement {Read, Write, Seek} for Arc<File> (591ece5)
    • Remove T: UnwindSafe bound from impl UnwindSafe for Arc<T> (#142)
  • Add task::Wake. (#145)

    This is equivalent to std::task::Wake, but using portable_atomic_util::Arc as a reference-counted pointer.

  • Respect RUSTC_WRAPPER in rustc version detection.

1.6.0

06 Dec 03:59
Compare
Choose a tag to compare
  • Add cfg_{has,no}_atomic_{8,16,32,64,128,ptr} macros to enable code when the corresponding atomic implementation is available/unavailable.

  • Add cfg_{has,no}_atomic_cas macros to enable code when atomic CAS/RMW implementation is available/unavailable.

  • Improve support for RISC-V targets without atomic CAS.