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

thread: implements available_concurrency on haiku #89306

Merged
merged 1 commit into from
Oct 1, 2021

Conversation

devnexen
Copy link
Contributor

No description provided.

@rust-highfive
Copy link
Collaborator

r? @joshtriplett

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 27, 2021
@nagisa
Copy link
Member

nagisa commented Sep 27, 2021

Seems reasonable to me.

@bors r+

@bors
Copy link
Contributor

bors commented Sep 27, 2021

📌 Commit 5d4048b has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 27, 2021
ehuss added a commit to ehuss/rust that referenced this pull request Sep 30, 2021
thread: implements available_concurrency on haiku
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 30, 2021
thread: implements available_concurrency on haiku
Manishearth added a commit to Manishearth/rust that referenced this pull request Sep 30, 2021
thread: implements available_concurrency on haiku
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 1, 2021
…arth

Rollup of 8 pull requests

Successful merges:

 - rust-lang#88782 (Fix ICE when `start` lang item has wrong generics)
 - rust-lang#89202 (Resolve infered types when complaining about unexpected call type )
 - rust-lang#89248 (Suggest similarly named associated items in trait impls)
 - rust-lang#89303 (Add `#[must_not_suspend]` to some types in std)
 - rust-lang#89306 (thread: implements available_concurrency on haiku)
 - rust-lang#89314 (fix(lint): don't suggest refutable patterns to "fix" irrefutable bind)
 - rust-lang#89370 (CTFE: tweak aggregate rvalue handling)
 - rust-lang#89392 (bootstrap: Update comment in config.library.toml.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit fccfc98 into rust-lang:master Oct 1, 2021
@rustbot rustbot added this to the 1.57.0 milestone Oct 1, 2021
@nielx
Copy link
Contributor

nielx commented Oct 2, 2021

This change does not compile and is incorrect.

  • mem::zeroed() and get_system_info() is unsafe, see compiler error message below.
  • system_info() returns a status_t indicating the error code or B_OK. It does not set errno, thus calling io::Error::last_os_error() will give a previous unrelated error code.

@devnexen are you okay to fix this?

error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
   --> library/std/src/sys/unix/thread.rs:342:48
    |
342 |             let mut sinfo: libc::system_info = crate::mem::zeroed();
    |                                                ^^^^^^^^^^^^^^^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior

error[E0133]: call to unsafe function is unsafe and requires unsafe function or block
   --> library/std/src/sys/unix/thread.rs:343:23
    |
343 |             let res = libc::get_system_info(&mut sinfo);
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior

@nagisa
Copy link
Member

nagisa commented Oct 2, 2021

Oh well. I'm open to having this reverted until a fixed version is submitted, too.

@devnexen
Copy link
Contributor Author

devnexen commented Oct 2, 2021

I pushed a PR #89462

@workingjubilee workingjubilee added the O-haiku Target: Be extant; from mouldering old leaves; spring arrives again label Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-haiku Target: Be extant; from mouldering old leaves; spring arrives again S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants