Introduce getcpu() system call from glibc

This commit is contained in:
Justine Tunney 2024-02-21 18:13:30 -08:00
parent 3eb405e0e2
commit 77a92f517b
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
7 changed files with 111 additions and 4 deletions

View 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