mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-22 23:38:14 +00:00
[client] define locking types and semantics to allow for alt methods
This commit is contained in:
@@ -44,4 +44,9 @@ static inline void nsleep(uint64_t ns)
|
||||
.tv_nsec = ns - ((ns / 1e9) * 1e9)
|
||||
};
|
||||
nanosleep(&ts, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
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)
|
Reference in New Issue
Block a user