From: Joonbum Ko Date: Fri, 30 Apr 2021 04:18:48 +0000 (+0900) Subject: Add missing pthread_mutex_unlock X-Git-Tag: accepted/tizen/unified/20210502.124131^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e180db114fb60ed4b4de5ecbb41085d620b7f30;p=platform%2Fcore%2Fuifw%2Fvulkan-wsi-tizen.git Add missing pthread_mutex_unlock Change-Id: I082412adb77524469af5a436a386e54cce5f7449 Signed-off-by: Joonbum Ko --- diff --git a/src/wsi/swapchain_tdm.c b/src/wsi/swapchain_tdm.c index 42b8f35..878d340 100644 --- a/src/wsi/swapchain_tdm.c +++ b/src/wsi/swapchain_tdm.c @@ -131,8 +131,11 @@ swapchain_tdm_queue_present_image(VkQueue queue, VK_ERROR("pthread_mutex_lock free queue failed\n"); tsq_err = tbm_surface_queue_release(swapchain_tdm->tbm_queue, tbm_surface); - VK_CHECK(tsq_err == TBM_SURFACE_QUEUE_ERROR_NONE, return VK_ERROR_SURFACE_LOST_KHR, - "tbm_surface_queue_release failed.\n"); + if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE) { + VK_ERROR("tbm_surface_queue_release failed.\n"); + pthread_mutex_unlock(&swapchain_tdm->free_queue_mutex); + return VK_ERROR_SURFACE_LOST_KHR; + } pthread_mutex_unlock(&swapchain_tdm->free_queue_mutex); pthread_cond_signal(&swapchain_tdm->free_queue_cond); @@ -248,8 +251,12 @@ swapchain_tdm_acquire_next_image(VkDevice device, } tsq_err = tbm_surface_queue_dequeue(swapchain_tdm->tbm_queue, tbm_surface); - VK_CHECK(tsq_err == TBM_SURFACE_QUEUE_ERROR_NONE, return VK_ERROR_SURFACE_LOST_KHR, - "tbm_surface_queue_dequeue failed.\n"); + if (tsq_err != TBM_SURFACE_QUEUE_ERROR_NONE) { + VK_ERROR("tbm_surface_queue_dequeue failed.\n"); + pthread_mutex_unlock(&swapchain_tdm->free_queue_mutex); + return VK_ERROR_SURFACE_LOST_KHR; + } + pthread_mutex_unlock(&swapchain_tdm->free_queue_mutex); if (sync)