atomic-rs icon indicating copy to clipboard operation
atomic-rs copied to clipboard

Generic Atomic<T> type for Rust

Results 11 atomic-rs issues
Sort by recently updated
recently updated
newest added

I am the maintainer for rust-atomic on debian. The crate builds on amd64. The tests fail though because the fallback feature is disabled by default. I attached the log below....

I am the maintainer for rust-atomic on debian. The crate builds on little-endian architectures ( armel, mipsel and mips64el). The tests fail though. I attached the log below. Note the...

![image](https://user-images.githubusercontent.com/92210438/159976437-c3e0340a-99b3-4adc-82ae-6fee3242a084.png)

```rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] #[repr(align(2))] pub enum Test { A, B(u8), } ``` `Test::A` maybe is 0x0000 or 0xXX00, so it maybe not equal when transmute to u16.

``` rust #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct Test { a: u8, b: u8, c: u8, d: u8, } fn main() { println!("align: {}", core::mem::align_of::()); println!("size: {}", core::mem::size_of::()); }...

`std` [does](https://doc.rust-lang.org/std/sync/atomic/struct.AtomicUsize.html#impl-RefUnwindSafe).

Atomic::compare_exchange compares the bitvalues of the contents and its first argument. In Rust, even values of simple types can be considered equal without being bitwise-equal. I ran into this with...

It would be lovely to have `fetch_add` for `f64` and `f32`. I know I could implement them with the provided intrinsics, but that is inconvenient.

As discussed in #37, use `Ordering::SeqCst` when unlocking the spinlock if the corresponding atomic operation had a requested ordering of `SeqCst`. Otherwise, the existing `Release` ordering should be fine. The...

The fallback implementation ignores the provided `Ordering` and always locks and unlocks the lock with `Acquire` and `Release` operations. However, this may not be sufficient to provide sequential consistency when...