You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This improves the CPU core count handling for FreeBSD. This uses sysconf
to grab the number of configured processors when logical and physical
CPU counts are requested, and then pthread_getaffinity_np and the number
of active processors. This takes into account the number of available
cores when the process is restricted to a subset of the processors.
This also fixes the `dispatch_workqueye` test, which has its own
implementation to extract the core count. FreeBSD does not have an
`hw.activecpu` syscall, so the syscallbyname was failing and the
activecpu count was garbage from the stack. I've updated the test to
initialize the value with `0xa1a1a1` to make the garbage clearer.
Also update the test for FreeBSD to take advantage of sysconf and
pthread_getaffinity_np in the test.
Fixes: #897
0 commit comments