diff options
author | rubidium <rubidium@openttd.org> | 2008-06-08 10:51:36 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-06-08 10:51:36 +0000 |
commit | 4657ae97fcd9487adb882f8634ad5cfe589d034c (patch) | |
tree | 051108d9da4b980db5e5e7eb8c7b81c8ea89e9ae /src/thread_pthread.cpp | |
parent | d49a86cf48a091c1cd78d9e440b648707946060d (diff) | |
download | openttd-4657ae97fcd9487adb882f8634ad5cfe589d034c.tar.xz |
(svn r13411) -Codechange: remove the return value from the thread procs because it is never used.
Diffstat (limited to 'src/thread_pthread.cpp')
-rw-r--r-- | src/thread_pthread.cpp | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/thread_pthread.cpp b/src/thread_pthread.cpp index 07d5e39b2..27cecc5a9 100644 --- a/src/thread_pthread.cpp +++ b/src/thread_pthread.cpp @@ -95,18 +95,15 @@ public: throw 0; } - /* virtual */ void *Join() + /* virtual */ void Join() { /* You cannot join yourself */ assert(!IsCurrent()); - void *ret; - pthread_join(m_thr, &ret); + pthread_join(m_thr, NULL); m_thr = 0; delete this; - - return ret; } /* virtual */ bool IsCurrent() @@ -126,14 +123,15 @@ private: */ static void *stThreadProc(void *thr) { - return ((ThreadObject_pthread *)thr)->ThreadProc(); + ((ThreadObject_pthread *)thr)->ThreadProc(); + pthread_exit(NULL); } /** * A new thread is created, and this function is called. Call the custom * function of the creator of the thread. */ - void *ThreadProc() + void ThreadProc() { /* The new thread stops here so the calling thread can complete pthread_create() call */ sem_wait(&m_sem_start); @@ -152,8 +150,6 @@ private: sem_post(&m_sem_stop); if (exit) delete this; - - pthread_exit(NULL); } }; |