summaryrefslogtreecommitdiff
path: root/src/thread
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2014-02-18 17:58:46 +0000
committerfrosch <frosch@openttd.org>2014-02-18 17:58:46 +0000
commitac2cd315ef82b97d6e43ade7650dd6b4f5ac35db (patch)
treedf3b2ff1c2b6afff57277703216cbf8fc66533a2 /src/thread
parent3e78c4dc7bfa0324d03615a3f64e3473bfb7760b (diff)
downloadopenttd-ac2cd315ef82b97d6e43ade7650dd6b4f5ac35db.tar.xz
(svn r26353) -Fix (r26349) [FS#5917]: Win32 and OS/2 ThreadMutex::WaitForSignal always asserted.
Diffstat (limited to 'src/thread')
-rw-r--r--src/thread/thread_os2.cpp3
-rw-r--r--src/thread/thread_win32.cpp3
2 files changed, 0 insertions, 6 deletions
diff --git a/src/thread/thread_os2.cpp b/src/thread/thread_os2.cpp
index a6aa944b6..d93fc0c71 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 6f9172f2f..484cc5513 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()