Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opcode: add Futex{Wake,Wait,Waitv} #272

Merged
merged 2 commits into from
Apr 13, 2024
Merged

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Apr 12, 2024

These opcodes are available since Linux 6.7, and are mentioned by #253. FutexWaitV expects a new struct futex_waitv which is available in linux-raw-sys. An opaque type is added to the main crate to avoid polling in the dependency.

See:

Copy link
Member

@quininer quininer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. This looks pretty good!

src/types.rs Outdated Show resolved Hide resolved
These opcodes are available since Linux 6.7.
@oxalica
Copy link
Contributor Author

oxalica commented Apr 12, 2024

Exposed types::FutexWaitV and also fixed a typo in tests (waitv, not wakev).

I noticed that io-uring-test fails test_udp_recvmsg_multishot_trunc on my machine (io-uring-test/src/tests/net.rs:1549:25, assertion failed: msg.is_payload_truncated()), not sure if it's something kernel related (I'm on 6.9.0-rc2). But at least it seems unrelated.

Copy link
Member

@quininer quininer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@quininer quininer merged commit 20f525b into tokio-rs:master Apr 13, 2024
12 checks passed
@quininer
Copy link
Member

Thank you!

@oxalica oxalica deleted the feat/futex branch April 13, 2024 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants