mirror of
https://github.com/bytedance/g3.git
synced 2026-05-04 22:51:02 +00:00
move cpu affinity code to g3-compat
This commit is contained in:
parent
13b6aa346a
commit
3e84294b0c
13 changed files with 136 additions and 30 deletions
21
lib/g3-compat/compat-src/linux/libc.c
Normal file
21
lib/g3-compat/compat-src/linux/libc.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __GLIBC__
|
||||
|
||||
#if !__GLIBC_PREREQ(2, 27)
|
||||
|
||||
#include <sys/mman.h>
|
||||
#include <sys/syscall.h>
|
||||
#include <unistd.h>
|
||||
|
||||
extern int memfd_create(const char *name, unsigned int flags);
|
||||
|
||||
int memfd_create(const char* name, unsigned int flags)
|
||||
{
|
||||
return syscall(SYS_memfd_create, name, flags);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue