Taken and slightly adapted from https://github.com/apple-oss-distributions/xnu/blob/8d741a5de7ff4191bf97d57b... .
The arm and arm64 implementations are not stable across kernel releases (yet). This works as expected under Rosetta 2 as well.
-- v2: ntdll: Implement NtGetCurrentProcessorNumber for macOS on x86_64.