From a5ef3860b0f4ef0c93c5e4b5f6f04bdff4ffd63d Mon Sep 17 00:00:00 2001 From: cxl Date: Sun, 1 Feb 2015 07:10:23 +0000 Subject: [PATCH] CtrlCore: SpinLock fix for single-threaded mode git-svn-id: svn://ultimatepp.org/upp/trunk@8118 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/Core/Mt.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/uppsrc/Core/Mt.h b/uppsrc/Core/Mt.h index 13f280c6b..3ad7bad9d 100644 --- a/uppsrc/Core/Mt.h +++ b/uppsrc/Core/Mt.h @@ -589,18 +589,20 @@ public: LazyUpdate() { dirty = true; } }; -struct SpinLock : Moveable { +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