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