Yonggang Luo
85ff3f525c
util: Rename DETECT_OS_UNIX to DETECT_OS_POSIX
...
Looking at each usage of DETECT_OS_UNIX, it's more about the POSIX API usage, not the
Unix-like OS, so let's rename it
And for POSIX it's a standard to claim which API present, but for UNIX there is no such thing
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Acked-by: Rob Clark <robdclark@chromium.org >
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29555 >
2024-06-07 01:56:28 +00:00
Yiwei Zhang
53d9debcf4
util: refactor to use DETECT_OS_ANDROID
...
except leaving u_endian.h behind to use __ANDROID__ directly to be
consistent with the rest in that file, which deserves a different
refactor
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Reviewed-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27374 >
2024-02-01 19:29:49 +00:00
Gurchetan Singh
1b133ad446
mesa/util: add <linux/fcntl.h>
...
F_ADD_SEALS + F_SEAL_* are defined in <linux/fcntl.h> on Android.
Reviewed-by: Aaron Ruby <aruby@blackberry.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26874 >
2024-01-18 18:45:40 +00:00
Yonggang Luo
d9c3601e29
util: trim trailing space for files src/util/**/*
...
Using the following bash script doing that
```
cd src/util
find . -type f -print0 | xargs -0 -n1 sed -i 's/[ \t]*$//'
```
Signed-off-by: Yonggang Luo <luoyonggang@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15093 >
2022-03-21 17:57:15 +00:00
Thomas Wagner
4856586ac6
util: use anonymous file for memory fd creation
...
The original implementation in os_memory_fd.c always uses memfds.
Replace this by using the already existing os_create_anonymous_file in
order to support older systems or systems without memfd.
Fixes: 1166ee9caf ("gallium: add utility and interface for memory fd allocations")
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13331 >
2021-10-27 15:26:52 +00:00
Thomas Wagner
1166ee9caf
gallium: add utility and interface for memory fd allocations
...
Add utility functions to allocate aligned memory backed by
mem_fd objects. Add interface to Gallium for same allocation.
It will be used in later commits for external memory support
in Vulkan/OpenGL.
Reviewed-by: Dave Airlie <airlied@redhat.com >
Tested-by: Heinrich Fink <hfink@snap.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12345 >
2021-10-06 13:49:08 +00:00