mirror of
https://github.com/verilator/verilator.git
synced 2025-01-01 04:07:34 +00:00
Signed-off-by: Guokai Chen <chenguokai17@mails.ucas.ac.cn>
This commit is contained in:
parent
26bdfc3474
commit
818aaa8b89
@ -28,6 +28,7 @@ Geza Lore
|
||||
Gianfranco Costamagna
|
||||
Glen Gibb
|
||||
Graham Rushton
|
||||
Guokai Chen
|
||||
Harald Heckmann
|
||||
Howard Su
|
||||
Huang Rui
|
||||
|
@ -43,7 +43,7 @@
|
||||
#if defined(__linux)
|
||||
# include <sched.h> // For sched_getcpu()
|
||||
#endif
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) && !defined(__arm64__)
|
||||
# include <cpuid.h> // For __cpuid_count()
|
||||
#endif
|
||||
// clang-format on
|
||||
@ -168,7 +168,7 @@ public:
|
||||
static int getcpu() { // Return current executing CPU
|
||||
#if defined(__linux)
|
||||
return sched_getcpu();
|
||||
#elif defined(__APPLE__)
|
||||
#elif defined(__APPLE__) && !defined(__arm64__)
|
||||
vluint32_t info[4];
|
||||
__cpuid_count(1, 0, info[0], info[1], info[2], info[3]);
|
||||
// info[1] is EBX, bits 24-31 are APIC ID
|
||||
|
Loading…
Reference in New Issue
Block a user