projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
util: add anon_file.h for all memfd/temp file usage
[mesa.git]
/
src
/
intel
/
tools
/
aub_mem.c
diff --git
a/src/intel/tools/aub_mem.c
b/src/intel/tools/aub_mem.c
index 1b217e130cac08d7c790000cd4a6c8c60a0c1cf0..f436627d19dfae84d90ac4d814c028c9ea4dee45 100644
(file)
--- a/
src/intel/tools/aub_mem.c
+++ b/
src/intel/tools/aub_mem.c
@@
-27,16
+27,7
@@
#include <sys/mman.h>
#include "aub_mem.h"
#include <sys/mman.h>
#include "aub_mem.h"
-
-#ifndef HAVE_MEMFD_CREATE
-#include <sys/syscall.h>
-
-static inline int
-memfd_create(const char *name, unsigned int flags)
-{
- return syscall(SYS_memfd_create, name, flags);
-}
-#endif
+#include "util/anon_file.h"
struct bo_map {
struct list_head link;
struct bo_map {
struct list_head link;
@@
-373,7
+364,7
@@
aub_mem_init(struct aub_mem *mem)
list_inithead(&mem->maps);
list_inithead(&mem->maps);
- mem->mem_fd =
memfd_create("phys memory", 0
);
+ mem->mem_fd =
os_create_anonymous_file(0, "phys memory"
);
return mem->mem_fd != -1;
}
return mem->mem_fd != -1;
}