diff options
author | smatz <smatz@openttd.org> | 2008-04-28 23:48:45 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-04-28 23:48:45 +0000 |
commit | 2d7430cf33909c699432ce3b2adb9a5c585d55c3 (patch) | |
tree | 69ccf08ecc286112f3247694b4ddb047f175edc0 /src | |
parent | 6181451b1396fbf091a27569325fe4900d1dabe8 (diff) | |
download | openttd-2d7430cf33909c699432ce3b2adb9a5c585d55c3.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.cpp | 4 |
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() |