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
This commit is contained in:
parent
56aceca439
commit
577bebe552
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user