(svn r13411) -Codechange: remove the return value from the thread procs because it is never used.

This commit is contained in:
rubidium
2008-06-08 10:51:36 +00:00
parent b1dc705492
commit 96d7f87cc9
7 changed files with 20 additions and 39 deletions

View File

@@ -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);
}
};