From 785ca1332319219828c4d76d032f31345c41e48c Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sat, 11 Feb 2023 15:35:19 +0800 Subject: [PATCH] =?UTF-8?q?wsi:=20Fixes=20passing=20argument=201=20of=20?= =?UTF-8?q?=E2=80=98mtx=5Funlock=E2=80=99=20from=20incompatible=20pointer?= =?UTF-8?q?=20type?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ../../src/vulkan/wsi/wsi_common_display.c:2908:15: error: passing argument 1 of ‘mtx_unlock’ from incompatible pointer type [-Werror=incompatible-pointer-types] 2908 | mtx_unlock(&wsi->wait_mutex); | ^~~~~~~~~~~~~~~~ | | | pthread_mutex_t * Signed-off-by: Yonggang Luo Reviewed-by: Jesse Natalie Acked-by: David Heidelberg Part-of: --- src/vulkan/wsi/wsi_common_display.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/vulkan/wsi/wsi_common_display.c b/src/vulkan/wsi/wsi_common_display.c index 650a78b2f37..12070e7ec87 100644 --- a/src/vulkan/wsi/wsi_common_display.c +++ b/src/vulkan/wsi/wsi_common_display.c @@ -1715,9 +1715,9 @@ wsi_display_fence_destroy(struct wsi_display_fence *fence) { /* Destroy hotplug fence list. */ if (fence->device_event) { - mtx_lock(&fence->wsi->wait_mutex); + pthread_mutex_lock(&fence->wsi->wait_mutex); list_del(&fence->link); - mtx_unlock(&fence->wsi->wait_mutex); + pthread_mutex_unlock(&fence->wsi->wait_mutex); fence->event_received = true; } @@ -2243,7 +2243,7 @@ udev_event_listener_thread(void *data) /* Note, this supports both drmSyncobjWait for fence->syncobj * and wsi_display_wait_for_event. */ - mtx_lock(&wsi->wait_mutex); + pthread_mutex_lock(&wsi->wait_mutex); pthread_cond_broadcast(&wsi->hotplug_cond); list_for_each_entry(struct wsi_display_fence, fence, &wsi_device->hotplug_fences, link) { @@ -2251,7 +2251,7 @@ udev_event_listener_thread(void *data) drmSyncobjSignal(wsi->syncobj_fd, &fence->syncobj, 1); fence->event_received = true; } - mtx_unlock(&wsi->wait_mutex); + pthread_mutex_unlock(&wsi->wait_mutex); udev_device_unref(dev); } } else if (ret < 0) { @@ -2926,15 +2926,15 @@ wsi_register_device_event(VkDevice _device, #ifdef HAVE_LIBUDEV /* Start listening for output change notifications. */ - mtx_lock(&wsi->wait_mutex); + pthread_mutex_lock(&wsi->wait_mutex); if (!wsi->hotplug_thread) { if (pthread_create(&wsi->hotplug_thread, NULL, udev_event_listener_thread, wsi_device)) { - mtx_unlock(&wsi->wait_mutex); + pthread_mutex_unlock(&wsi->wait_mutex); return VK_ERROR_OUT_OF_HOST_MEMORY; } } - mtx_unlock(&wsi->wait_mutex); + pthread_mutex_unlock(&wsi->wait_mutex); #endif struct wsi_display_fence *fence; @@ -2948,9 +2948,9 @@ wsi_register_device_event(VkDevice _device, fence->device_event = true; - mtx_lock(&wsi->wait_mutex); + pthread_mutex_lock(&wsi->wait_mutex); list_addtail(&fence->link, &wsi_device->hotplug_fences); - mtx_unlock(&wsi->wait_mutex); + pthread_mutex_unlock(&wsi->wait_mutex); if (sync_out) { ret = wsi_display_sync_create(device, fence, sync_out);