From 90b90e667a21bfe2c20a3ff464bb7a87753c76ce Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 1 Aug 2021 17:14:58 +1000 Subject: [PATCH] [common] event: lgResetEvent should return the last state of the event --- common/src/platform/linux/event.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/src/platform/linux/event.c b/common/src/platform/linux/event.c index f0607f22..53bd3587 100644 --- a/common/src/platform/linux/event.c +++ b/common/src/platform/linux/event.c @@ -203,6 +203,5 @@ bool lgSignalEvent(LGEvent * handle) bool lgResetEvent(LGEvent * handle) { assert(handle); - atomic_store_explicit(&handle->signaled, false, memory_order_release); - return true; + return atomic_exchange_explicit(&handle->signaled, false, memory_order_release); }