diff options
author | Marek Olšák <marek.olsak@amd.com> | 2023-04-13 15:38:03 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2023-04-25 05:16:33 +0000 |
commit | 171d31640262020af5b45d62839701dba45f44cf (patch) | |
tree | b1a880d31360d749c6ff39b6356de28f1c355bc9 /src/virtio | |
parent | 2c5a2f1a054259602b47ae5e3e493426bdab503c (diff) | |
download | mesa-171d31640262020af5b45d62839701dba45f44cf.tar.gz |
venus: fix the RHEL8 build by using syscall for gettid
src/virtio/vulkan/vn_common.c: In function ‘vn_ring_monitor_acquire’:
src/virtio/vulkan/vn_common.c:129:16: error: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Werror=implicit-function-declaration]
129 | pid_t tid = gettid();
Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org>
Reviewed-by: Ryan Neph <ryanneph@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22489>
Diffstat (limited to 'src/virtio')
-rw-r--r-- | src/virtio/vulkan/vn_common.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/virtio/vulkan/vn_common.c b/src/virtio/vulkan/vn_common.c index da74c58da9e..9e8b789ab5e 100644 --- a/src/virtio/vulkan/vn_common.c +++ b/src/virtio/vulkan/vn_common.c @@ -11,6 +11,7 @@ #include "vn_common.h" #include <stdarg.h> +#include <sys/syscall.h> #include "util/log.h" #include "util/os_misc.h" @@ -126,7 +127,7 @@ vn_extension_get_spec_version(const char *name) static bool vn_ring_monitor_acquire(struct vn_ring *ring) { - pid_t tid = gettid(); + pid_t tid = syscall(SYS_gettid); if (!ring->monitor.threadid && tid != ring->monitor.threadid && mtx_trylock(&ring->monitor.mutex) == thrd_success) { /* register as the only waiting thread that monitors the ring. */ @@ -138,7 +139,7 @@ vn_ring_monitor_acquire(struct vn_ring *ring) void vn_ring_monitor_release(struct vn_ring *ring) { - if (gettid() != ring->monitor.threadid) + if (syscall(SYS_gettid) != ring->monitor.threadid) return; ring->monitor.threadid = 0; |