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

libublksrv: use sched_setaffinity() instead of pthread function #77

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

dhavale
Copy link
Contributor

@dhavale dhavale commented Nov 14, 2024

pthread_setaffinity_np() is actually a wrapper around sched_setaffinity(). For our usecase we are trying to set affinity only of the current thread, so we can use sched_setaffinity() as a drop in replacement. This makes code more portable (< glibc2.3.4, bionic) and concise while keeping the functionality same.

pthread_setaffinity_np() is actually a wrapper around
sched_setaffinity(). For our usecase we are trying to set affinity
only of the current thread, so we can use sched_setaffinity() as a drop
in replacement. This makes code more portable (< glibc2.3.4, bionic)
and concise while keeping the functionality same.

Signed-off-by: Sandeep Dhavale <[email protected]>
@ming1 ming1 merged commit 1f486cd into ublk-org:master Nov 15, 2024
1 check passed
@dhavale dhavale deleted the sched_setaffinty branch November 15, 2024 17:52
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