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

aff_iterate() fails on M1 macbooks #188

Conversation

jpihlaja-bt
Copy link
Contributor

The thread_policy_set call in aff_iterate fails on with
KERN_NOT_SUPPORTED on M1 macbooks. The reported error from the
regression tests is "Success" as thread_policy_set doesn't set
errno. This patch converts KERN_NOT_SUPPORTED into a successful
return, as the the affinity binding is only advisory in the regression
tests, and sets errno to EINVAL on other errors.

Fixes #186

The `thread_policy_set` call in `aff_iterate` fails with
`KERN_NOT_SUPPORTED` on M1 macbooks. The reported error from the
regression tests is "Success" because `thread_policy_set` doesn't set
errno.

This patch converts `KERN_NOT_SUPPORTED` into a successful return and
sets errno to `EINVAL` on other errors.  This is ok in the regression
tests as there affinity binding is only advisory.

Fixes concurrencykit#186
@jpihlaja-bt jpihlaja-bt force-pushed the ref/heads/jpihlaja/186/aff_iterate-on-m1 branch from a44fd54 to 63bc921 Compare February 10, 2022 16:58
@jpihlaja-bt jpihlaja-bt deleted the ref/heads/jpihlaja/186/aff_iterate-on-m1 branch February 10, 2022 17:04
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.

aff_iterate() fails on M1 macbooks
1 participant