From 577bebe55269c6967cfc9860c72e6490736777dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Thu, 22 Jun 2006 10:00:17 +0000 Subject: [PATCH] pthread_exit has to be called on thread exit, it doesn't return, thus we don't care about the routine return code git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17906 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/libroot/posix/pthread/pthread.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/system/libroot/posix/pthread/pthread.c b/src/system/libroot/posix/pthread/pthread.c index a40824512f..cff6bd3c99 100644 --- a/src/system/libroot/posix/pthread/pthread.c +++ b/src/system/libroot/posix/pthread/pthread.c @@ -22,12 +22,14 @@ static int32 _pthread_thread_entry(void *entry_data) { struct pthread_data *pdata = (struct pthread_data *)entry_data; - thread_func entry = pdata->entry; + void *(*entry)(void*) = (void *(*)(void*))pdata->entry; void *data = pdata->data; free(pdata); on_exit_thread(_pthread_key_call_destructors, NULL); - return entry(data); + + pthread_exit(entry(data)); + return B_OK; }