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

Add OpenBSD's futex.h. #2761

Merged
merged 3 commits into from Apr 20, 2022
Merged

Add OpenBSD's futex.h. #2761

merged 3 commits into from Apr 20, 2022

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Apr 19, 2022

This adds OpenBSD's src/sys/sys/futex.h.

@rust-highfive
Copy link

Some changes occurred in OpenBSD module

cc @semarie

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Amanieu (or someone else) soon.

Please see the contribution instructions for more information.

@semarie
Copy link
Contributor

semarie commented Apr 19, 2022

Some points:

  • libc-test/build.rs needs to include sys/futex.h (for OpenBSD), else the CI will fail (github actions doesn't run it, but I am)
  • libc-test/semver/openbsd.txt needs to include new public symbols
  • timespec struct needs to be declared used inside src/unix/bsd/netbsdlike/openbsd/mod.rs (or using ::timespec instead of timespec)

@m-ou-se
Copy link
Member Author

m-ou-se commented Apr 19, 2022

@semarie Thanks! How about now?

@semarie
Copy link
Contributor

semarie commented Apr 19, 2022

@m-ou-se my local CI still doesn't pass due to volatile arguments in the function (rust doesn't understand volatile).
so could you add a "futex" entry inside cfg.skip_fn() with a comment, in order to avoid checking the function ?

something like:

diff --git a/libc-test/build.rs b/libc-test/build.rs
index 27497fa7189..11c9c1d2e5c 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -505,6 +506,9 @@ fn test_openbsd(target: &str) {
             // https://marc.info/?l=openbsd-cvs&m=154723400730318
             "mincore" => true,
 
+            // futex has volative arguments, Rust doesn't understand them
+            "futex" => true,
+
             _ => false,
         }
     });

else, with it, all tests passed. I am fine with your PR.

libc-test/build.rs Outdated Show resolved Hide resolved
Co-authored-by: Thom Chiovoloni <chiovolonit@gmail.com>
@Amanieu
Copy link
Member

Amanieu commented Apr 20, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Apr 20, 2022

📌 Commit e5b9bc0 has been approved by Amanieu

@bors
Copy link
Contributor

bors commented Apr 20, 2022

⌛ Testing commit e5b9bc0 with merge d260cea...

@bors
Copy link
Contributor

bors commented Apr 20, 2022

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: Amanieu
Pushing d260cea to master...

@bors bors merged commit d260cea into rust-lang:master Apr 20, 2022
@m-ou-se m-ou-se deleted the openbsd-futex branch April 20, 2022 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants