google / google/zerocopy

Support atomic types

Open
#1,009 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
2.6k
Forks
179
Avg merge
1d 19h
Merged PRs (30d)
29

Description

## Progress

- [x] https://github.com/rust-lang/rust/pull/121943
- [ ] Trait implementations
- [x] `AtomicBool`
- [x] `KnownLayout`
- [x] `TryFromBytes` / `FromZeros`
- [x] `IntoBytes`
- [x] `Unaligned`
- [x] `AtomicU8`, `AtomicI8`
- [x] `KnownLayout`
- [x] `TryFromBytes` / `FromZeros` / `FromBytes`
- [x] `IntoBytes`
- [x] `Unaligned`
- [x] `AtomicUN` / `AtomicIN` (`N > 8`)
- [x] `KnownLayout`
- [x] `TryFromBytes` / `FromZeros` / `FromBytes`
- [x] `IntoBytes`
- [ ] `AtomicPtr`
- [x] `KnownLayout`
- [ ] `TryFromBytes` / `FromZeros`
- [ ] Support platforms for which `target_has_atomics` is spuriously false (see below)

## Details

### `target_has_atomics`

On some platforms, `cfg(target_has_atomics)` is disabled despite atomics support. For example, `thumbv6m-none-eabi` supports `AtomicU32` but `cfg(target_has_atomic = "32")` is false on that platform. We will be able to support these cases once [`cfg(target_has_atomic_load_store)` is stabilized](https://github.com/rust-lang/rust/issues/94039).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.