concurrencykit / ck

Concurrency primitives, safe memory reclamation mechanisms and non-blocking (including lock-free) data structures designed to aid in the research, design and implementation of high performance concurrent systems developed in C99+.
http://concurrencykit.org/
Other
2.34k stars 312 forks source link

aff_iterate() fails on M1 macbooks #188

Closed jpihlaja-bt closed 2 years ago

jpihlaja-bt commented 2 years ago

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