From 0753e63644f8f06ba1e68a4bd4c9a9ce63b85d21 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 21 Dec 2017 01:11:42 +1100 Subject: [PATCH] [client] fixed unlock define --- client/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/utils.h b/client/utils.h index 1a68f82b..b2a76e82 100644 --- a/client/utils.h +++ b/client/utils.h @@ -48,5 +48,5 @@ static inline void nsleep(uint64_t ns) typedef volatile int LG_Lock; #define LG_LOCK_INIT(x) (x) = 0 -#define LG_LOCK(x) while(__sync_lock_test_and_set(&(x), 1)) -#define LG_UNLOCK(x) __sync_lock_release(&this->mouseLock) \ No newline at end of file +#define LG_LOCK(x) while(__sync_lock_test_and_set(&(x), 1)) {nsleep(100);} +#define LG_UNLOCK(x) __sync_lock_release(&x) \ No newline at end of file