Skip to content

Commit

Permalink
Auto merge of #131841 - paulmenage:futex-abstraction, r=joboet
Browse files Browse the repository at this point in the history
Abstract the state type for futexes

In the same way that we expose `SmallAtomic` and `SmallPrimitive` to allow Windows to use a value other than an `AtomicU32` for its futex state, switch the primary futex state type from `AtomicU32` to `futex::Futex`.  The `futex::Futex` type should be usable as an atomic value with underlying primitive type equal to `futex::Primitive`. (`SmallAtomic` is also renamed to `SmallFutex`).

This allows supporting the futex API on systems where the underlying kernel futex implementation requires more user state than simply an `AtomicU32`.

All in-tree futex implementations simply define {`Futex`,`Primitive`} directly as {`AtomicU32`,`u32`}.
  • Loading branch information
bors committed Oct 18, 2024
2 parents d5eba4d + 19b9f3d commit 07f7ec0
Showing 0 changed files with 0 additions and 0 deletions.

0 comments on commit 07f7ec0

Please sign in to comment.