summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-04-28 23:48:45 +0000
committersmatz <smatz@openttd.org>2008-04-28 23:48:45 +0000
commit868c17a175236b7cc0d08e6df881a2e1124e895e (patch)
tree69ccf08ecc286112f3247694b4ddb047f175edc0 /src
parentdd00683a463f5b0022cd4bbeff8fd4515182e6ee (diff)
downloadopenttd-868c17a175236b7cc0d08e6df881a2e1124e895e.tar.xz
(svn r12916) -Fix: let ThreadObject_pthread::IsRunning() behave the same way as ThreadObject_Win32::IsRunning() does
Diffstat (limited to 'src')
-rw-r--r--src/thread_pthread.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/thread_pthread.cpp b/src/thread_pthread.cpp
index 7aa0fda18..4645e4027 100644
--- a/src/thread_pthread.cpp
+++ b/src/thread_pthread.cpp
@@ -63,7 +63,9 @@ public:
/* virtual */ bool IsRunning()
{
- return m_thr != 0;
+ int sval;
+ sem_getvalue(&m_sem_stop, &sval);
+ return sval == 0;
}
/* virtual */ bool WaitForStop()