util: add anon_file.h for all memfd/temp file usage
authorGreg V <greg@unrelenting.technology>
Thu, 18 Jan 2018 20:29:14 +0000 (23:29 +0300)
committerEric Engestrom <eric@engestrom.ch>
Wed, 7 Aug 2019 22:57:55 +0000 (22:57 +0000)
commitc0376a123418df0050dc45d3e1e84f6b29a6a1f3
treecf94494957e38609c5fbd464e53f10652dbf9909
parent519bebdb40d9df5926e8b16dedd36b8e0f356f60
util: add anon_file.h for all memfd/temp file usage

Move the Weston os_create_anonymous_file code from egl/wayland into util,
add support for Linux memfd and FreeBSD SHM_ANON,
use that code in anv/aubinator instead of explicit memfd calls for portability.

Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
src/egl/drivers/dri2/platform_wayland.c
src/intel/tools/aub_mem.c
src/intel/vulkan/anv_allocator.c
src/intel/vulkan/anv_gem_stubs.c
src/util/Makefile.sources
src/util/anon_file.c [new file with mode: 0644]
src/util/anon_file.h [new file with mode: 0644]
src/util/meson.build