You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With `rustix::thread::futex` being both a deprecated function and
a public module, I'm seeing warnings like this when I use it in
some simple testcases:
```console
warning: use of deprecated function `rustix::thread::futex`: There are now individual functions available to perform futex operations with improved type safety. See the futex module.
--> test.rs:2:21
|
2 | use rustix::thread::futex;
| ^^^^^
|
= note: `#[warn(deprecated)]` on by default
```
To fix this, move the deprecation from the `futex` function to the
`FutexOperation` enum. This has the same effect, but doesn't
produce the warning then the `futex` module is used.
Also while using the API, I found `futex::FutexFlags` to be a little
redundant, so I think it makes sense to rename it to `futex::Flags`,
and similarly rename `futex::FUTEX_WAITERS` to `futex::WAITERS` and
so on.
This also splits `FutexOperation` into two enums internally, so that
the public `FutexOperation` which is `#[non_exhausitive]` can continue
to have its original contents, and the private enum can add new opcodes.
0 commit comments