am ea5dea8e: am db2903fa: am cbeccc84: am 200de748: Merge "Fix race condition in pthread_create()"

* commit 'ea5dea8edb4217da7798ef29759c2b5d27f7dcfb':
  Fix race condition in pthread_create()
This commit is contained in:
Elliott Hughes 2012-08-17 16:30:02 -07:00 committed by Android Git Automerger
commit 230df050ed

View File

@ -364,10 +364,10 @@ int pthread_create(pthread_t *thread_out, pthread_attr_t const * attr,
_thread_created_hook(tid); _thread_created_hook(tid);
pthread_mutex_unlock(&gDebuggerNotificationLock); pthread_mutex_unlock(&gDebuggerNotificationLock);
// Let the thread run. // Publish the pthread_t and let the thread run.
*thread_out = (pthread_t) thread;
pthread_mutex_unlock(start_mutex); pthread_mutex_unlock(start_mutex);
*thread_out = (pthread_t) thread;
return 0; return 0;
} }