Skip to content
Snippets Groups Projects
Commit e159d0b3 authored by Martin's avatar Martin
Browse files

changed return value to 0 on lookup fail in pthread_self()

parent f3566f0b
Branches
No related tags found
No related merge requests found
......@@ -241,7 +241,7 @@ int pthread_detach(pthread_t th)
pthread_t pthread_self(void)
{
pthread_t result = -1;
pthread_t result = 0;
mutex_lock(&pthread_mutex);
int pid = thread_pid; /* thread_pid is volatile */
for (int i = 0; i < MAXTHREADS; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment