am 73ef27cd
: Merge "Clarify a comment."
* commit '73ef27cd0de0c6b7d4f6bc9c2250dbae3f0a88c3': Clarify a comment.
This commit is contained in:
commit
200fcb26d2
@ -94,9 +94,9 @@ void pthread_exit(void* return_value) {
|
|||||||
|
|
||||||
pthread_mutex_lock(&gThreadListLock);
|
pthread_mutex_lock(&gThreadListLock);
|
||||||
if ((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) != 0) {
|
if ((thread->attr.flags & PTHREAD_ATTR_FLAG_DETACHED) != 0) {
|
||||||
// The thread is detached, so we can destroy the pthread_internal_t.
|
// The thread is detached, so we can free the pthread_internal_t.
|
||||||
// First make sure that the thread does not try to clear the tid since
|
// First make sure that the kernel does not try to clear the tid field
|
||||||
// it points into memory that will be freed.
|
// because we'll have freed the memory before the thread actually exits.
|
||||||
__set_tid_address(NULL);
|
__set_tid_address(NULL);
|
||||||
_pthread_internal_remove_locked(thread);
|
_pthread_internal_remove_locked(thread);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user