mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-06-14 06:12:25 -06:00
CtrlCore: SpinLock fix for single-threaded mode
git-svn-id: svn://ultimatepp.org/upp/trunk@8118 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9d117afc64
commit
a5ef3860b0
1 changed files with 5 additions and 3 deletions
|
|
@ -589,18 +589,20 @@ public:
|
|||
LazyUpdate() { dirty = true; }
|
||||
};
|
||||
|
||||
struct SpinLock : Moveable<SpinLock> {
|
||||
struct SpinLock {
|
||||
bool TryEnter() { return true; }
|
||||
void Leave() {}
|
||||
void Enter() {}
|
||||
|
||||
class Lock;
|
||||
|
||||
SpinLock() {}
|
||||
};
|
||||
|
||||
class SpinLock::Lock : NoCopy {
|
||||
public:
|
||||
Lock(SpinLock& s) : s(s) {}
|
||||
~Lock() {}
|
||||
Lock(SpinLock& s) {}
|
||||
~Lock() {}
|
||||
};
|
||||
|
||||
#define INTERLOCKED
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue