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.
From: Marc-Aurel Zent mzent@codeweavers.com
See _os_cpu_number at xnu/libsyscall/os/tsd.h. The arm and arm64 implementations are not stable across kernel releases (yet). --- dlls/ntdll/unix/thread.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/ntdll/unix/thread.c b/dlls/ntdll/unix/thread.c index a7114825118..5eaf3bf85b8 100644 --- a/dlls/ntdll/unix/thread.c +++ b/dlls/ntdll/unix/thread.c @@ -2563,6 +2563,12 @@ ULONG WINAPI NtGetCurrentProcessorNumber(void) #if defined(__linux__) && defined(__NR_getcpu) int res = syscall(__NR_getcpu, &processor, NULL, NULL); if (res != -1) return processor; +#elif defined(__APPLE__) && (defined(__x86_64__) || defined(__i386__)) + struct { + unsigned long p1, p2; + } p; + __asm__ __volatile__("sidt %[p]" : [p] "=&m"(p)); + return (ULONG)(p.p1 & 0xfff); #endif
if (peb->NumberOfProcessors > 1)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=150043
Your paranoid android.
=== debian11b (64 bit WoW report) ===
winmm: mci: Timeout
Report validation errors: msvcrt:string crashed (fffffd25)