From ab03587b64ce42041a0c47ed0064068fc287ef4f Mon Sep 17 00:00:00 2001 From: Yonggang Luo Date: Sat, 19 Feb 2022 13:05:29 +0800 Subject: [PATCH] Fixes thread compare in vkr_ring_stop by using thrd_equal Signed-off-by: Yonggang Luo Part-of: --- src/venus/vkr_ring.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/venus/vkr_ring.c b/src/venus/vkr_ring.c index 4769797..5fea070 100644 --- a/src/venus/vkr_ring.c +++ b/src/venus/vkr_ring.c @@ -351,7 +351,7 @@ bool vkr_ring_stop(struct vkr_ring *ring) { mtx_lock(&ring->mutex); - if (ring->thread == thrd_current()) { + if (thrd_equal(ring->thread, thrd_current())) { mtx_unlock(&ring->mutex); return false; }