diff --git a/src/thread/thread_os2.cpp b/src/thread/thread_os2.cpp index a6aa944b67..d93fc0c710 100644 --- a/src/thread/thread_os2.cpp +++ b/src/thread/thread_os2.cpp @@ -128,12 +128,9 @@ public: /* virtual */ void WaitForSignal() { assert(this->recursive_count == 1); // Do we need to call Begin/EndCritical multiple times otherwise? - uint old_recursive_count = this->recursive_count; - this->recursive_count = 0; this->EndCritical(); DosWaitEventSem(event, SEM_INDEFINITE_WAIT); this->BeginCritical(); - this->recursive_count = old_recursive_count; } /* virtual */ void SendSignal() diff --git a/src/thread/thread_win32.cpp b/src/thread/thread_win32.cpp index 6f9172f2f7..484cc55137 100644 --- a/src/thread/thread_win32.cpp +++ b/src/thread/thread_win32.cpp @@ -141,12 +141,9 @@ public: /* virtual */ void WaitForSignal() { assert(this->recursive_count == 1); // Do we need to call Begin/EndCritical multiple times otherwise? - uint old_recursive_count = this->recursive_count; - this->recursive_count = 0; this->EndCritical(); WaitForSingleObject(this->event, INFINITE); this->BeginCritical(); - this->recursive_count = old_recursive_count; } /* virtual */ void SendSignal()