[client] fixed unlock define

This commit is contained in:
Geoffrey McRae 2017-12-21 01:11:42 +11:00
parent 5501d22a2d
commit 0753e63644

View File

@ -48,5 +48,5 @@ static inline void nsleep(uint64_t ns)
typedef volatile int LG_Lock; typedef volatile int LG_Lock;
#define LG_LOCK_INIT(x) (x) = 0 #define LG_LOCK_INIT(x) (x) = 0
#define LG_LOCK(x) while(__sync_lock_test_and_set(&(x), 1)) #define LG_LOCK(x) while(__sync_lock_test_and_set(&(x), 1)) {nsleep(100);}
#define LG_UNLOCK(x) __sync_lock_release(&this->mouseLock) #define LG_UNLOCK(x) __sync_lock_release(&x)