Skip to content

Conversation

jonas-schievink
Copy link
Contributor

No description provided.

src/sched.rs Outdated
}

/// Determines the CPU on which the calling thread is running.
pub fn sched_getcpu() -> Result<usize> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like this is supported on other platforms, including FreeBSD and DragonFly.

Can you move this to the sched_affinity section below (since it seems related and has these platforms already?

@rtzoeller
Copy link
Collaborator

Thanks! Can you modify the existing test here to validate that setting the affinity actually has an effect by calling sched_getcpu?

@jonas-schievink
Copy link
Contributor Author

Thanks for the review! I've addressed the comments.

@rtzoeller
Copy link
Collaborator

@jonas-schievink can you squash the current changes into a single commit? Otherwise this looks great.

@jonas-schievink
Copy link
Contributor Author

Okay, I've squashed the commits

Copy link
Collaborator

@rtzoeller rtzoeller left a comment

Choose a reason for hiding this comment

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

bors r+

@bors bors bot merged commit a40d49b into nix-rust:master Sep 27, 2022
@jonas-schievink jonas-schievink deleted the sched-getcpu branch September 27, 2022 13:39
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