Skip to content

Add clock_nanosleep to freebsd and netbsd#1922

Merged
bors merged 1 commit into
rust-lang:masterfrom
maxbla:master
Oct 15, 2020
Merged

Add clock_nanosleep to freebsd and netbsd#1922
bors merged 1 commit into
rust-lang:masterfrom
maxbla:master

Conversation

@maxbla

@maxbla maxbla commented Oct 13, 2020

Copy link
Copy Markdown
Contributor

fixes #1921

@rust-highfive

Copy link
Copy Markdown

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

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@maxbla maxbla marked this pull request as ready for review October 13, 2020 14:21
@maxbla

maxbla commented Oct 13, 2020

Copy link
Copy Markdown
Contributor Author

clock_nanosleep was added in freeBSD 11.1 release! time to add another cfg.

@JohnTitor

JohnTitor commented Oct 14, 2020

Copy link
Copy Markdown
Member

Overall it looks good to me but I'm not sure this(clock_nanosleep) is available on redox, is it @jackpot51?

@maxbla

maxbla commented Oct 15, 2020

Copy link
Copy Markdown
Contributor Author

Thanks for the review. After submitting this PR, I have a couple more concerns

  1. Freebsd 11.0 doesn't have clock_nanosleep - it was added in 11.1. If we're still trying to support 11.0, I would need to remove clock_nanosleep from our freebsd 11 target.
  2. Contributing.md makes it look like I should add clock_nanosleep to every supported platform's mod.rs instead of unix's mod.rs with a cfg.

regarding redox OS, I searched for clock_nanosleep in redox and relibc and only got results from llvm, so I think its safe to say redox doesn't implement it.

@semarie

semarie commented Oct 15, 2020 via email

Copy link
Copy Markdown
Contributor

@JohnTitor

Copy link
Copy Markdown
Member

So, I'm happy to extend the support for clock_nanosleep but we should add them to the only platforms that we're sure it's available. Given the above comments, I don't think src/unix/mod.rs is the best place atm?

@maxbla

maxbla commented Oct 15, 2020

Copy link
Copy Markdown
Contributor Author

Yep, totally agree. I'll force push the change I should have made.

@maxbla

maxbla commented Oct 15, 2020

Copy link
Copy Markdown
Contributor Author

Should I add clock_nanosleep for freebsd 11? clock_nanosleep appears to have been added in 11.1, so it wouldn't work for 11.0

@maxbla

maxbla commented Oct 15, 2020

Copy link
Copy Markdown
Contributor Author

Turns out clock_nanosleep was only missing on freebsd and netbsd...

@maxbla maxbla changed the title move clock_nanosleep to src/unix/mod.rs Add clock_nanosleep to freebsd and netbsd Oct 15, 2020
Comment thread src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs Outdated
@JohnTitor

Copy link
Copy Markdown
Member

The change itself looks good to me, r=me once the above nit is resolved.

@JohnTitor

Copy link
Copy Markdown
Member

Thanks!
@bors r+

@bors

bors commented Oct 15, 2020

Copy link
Copy Markdown
Contributor

📌 Commit a6c451d has been approved by JohnTitor

@bors

bors commented Oct 15, 2020

Copy link
Copy Markdown
Contributor

⌛ Testing commit a6c451d with merge 22633e2...

@bors

bors commented Oct 15, 2020

Copy link
Copy Markdown
Contributor

☀️ Test successful - checks-actions, checks-cirrus-freebsd-10, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12
Approved by: JohnTitor
Pushing 22633e2 to master...

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.

Add clock_nanosleep to most unix targets

5 participants