mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-23 22:02:27 +00:00
Introduce getcpu() system call from glibc
This commit is contained in:
parent
3eb405e0e2
commit
77a92f517b
7 changed files with 111 additions and 4 deletions
18
libc/nt/kernel32/GetNumaProcessorNodeEx.S
Normal file
18
libc/nt/kernel32/GetNumaProcessorNodeEx.S
Normal file
|
@ -0,0 +1,18 @@
|
|||
#include "libc/nt/codegen.h"
|
||||
.imp kernel32,__imp_GetNumaProcessorNodeEx,GetNumaProcessorNodeEx
|
||||
|
||||
.text.windows
|
||||
.ftrace1
|
||||
GetNumaProcessorNodeEx:
|
||||
.ftrace2
|
||||
#ifdef __x86_64__
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
mov __imp_GetNumaProcessorNodeEx(%rip),%rax
|
||||
jmp __sysv2nt
|
||||
#elif defined(__aarch64__)
|
||||
mov x0,#0
|
||||
ret
|
||||
#endif
|
||||
.endfn GetNumaProcessorNodeEx,globl
|
||||
.previous
|
Loading…
Add table
Add a link
Reference in a new issue