Fixes thread compare in vkr_ring_stop by using thrd_equal

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/713>
macos/master
Yonggang Luo 3 years ago committed by Marge Bot
parent 97453f4ea1
commit ab03587b64
  1. 2
      src/venus/vkr_ring.c

@ -351,7 +351,7 @@ bool
vkr_ring_stop(struct vkr_ring *ring) vkr_ring_stop(struct vkr_ring *ring)
{ {
mtx_lock(&ring->mutex); mtx_lock(&ring->mutex);
if (ring->thread == thrd_current()) { if (thrd_equal(ring->thread, thrd_current())) {
mtx_unlock(&ring->mutex); mtx_unlock(&ring->mutex);
return false; return false;
} }

Loading…
Cancel
Save