From cd35d14374079f6c833f1bd30f732578f64f3836 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Tue, 10 Jun 2014 18:01:39 +0200 Subject: [PATCH] SDL2: Revert a bad change --HG-- branch : sdl2 --- code/nel/include/nel/misc/reader_writer.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/code/nel/include/nel/misc/reader_writer.h b/code/nel/include/nel/misc/reader_writer.h index dc7c7f1b5..04ab8997f 100644 --- a/code/nel/include/nel/misc/reader_writer.h +++ b/code/nel/include/nel/misc/reader_writer.h @@ -33,8 +33,8 @@ class CReaderWriter { private: - volatile CAtomicLock _Fairness; - volatile CAtomicLock _ReadersMutex; + volatile CMutex _Fairness; + volatile CMutex _ReadersMutex; volatile CMutex _RWMutex; volatile sint _ReadersLevel; @@ -45,29 +45,29 @@ public: void enterReader() { - const_cast(_Fairness).enter(); - const_cast(_ReadersMutex).enter(); + const_cast(_Fairness).enter(); + const_cast(_ReadersMutex).enter(); ++_ReadersLevel; if (_ReadersLevel == 1) const_cast(_RWMutex).enter(); - const_cast(_ReadersMutex).leave(); - const_cast(_Fairness).leave(); + const_cast(_ReadersMutex).leave(); + const_cast(_Fairness).leave(); } void leaveReader() { - const_cast(_ReadersMutex).enter(); + const_cast(_ReadersMutex).enter(); --_ReadersLevel; if (_ReadersLevel == 0) const_cast(_RWMutex).leave(); - const_cast(_ReadersMutex).leave(); + const_cast(_ReadersMutex).leave(); } void enterWriter() { - const_cast(_Fairness).enter(); + const_cast(_Fairness).enter(); const_cast(_RWMutex).enter(); - const_cast(_Fairness).leave(); + const_cast(_Fairness).leave(); } void leaveWriter()