From: Siddhesh Poyarekar Date: Fri, 10 Jul 2015 17:53:57 +0000 (+0530) Subject: Remove unnecessary mutex locks from tst-tls-atexit test case X-Git-Tag: upstream/2.24~1385 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0c8f39cbf769ef35f54b57859e1e87b5291daf5e;p=platform%2Fupstream%2Fglibc.git Remove unnecessary mutex locks from tst-tls-atexit test case The locks don't synchronize with anything - they were likely introduced initially to synchronize with some main thread code, but that is no longer evident. --- diff --git a/ChangeLog b/ChangeLog index 8ee61d6..0c7fc2c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-07-10 Siddhesh Poyarekar + * stdlib/tst-tls-atexit.c (load): Remove unnecessary mutex + locks. + * stdlib/tst-tls-atexit.c (load): Avoid boolean coercion. 2015-07-10 Torvald Riegel diff --git a/stdlib/tst-tls-atexit.c b/stdlib/tst-tls-atexit.c index 7a69722..5ee04a8 100644 --- a/stdlib/tst-tls-atexit.c +++ b/stdlib/tst-tls-atexit.c @@ -29,12 +29,10 @@ #include void *handle; -pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER; void * load (void *u) { - pthread_mutex_lock (&m); handle = dlopen ("$ORIGIN/tst-tls-atexit-lib.so", RTLD_LAZY); if (handle == NULL) { @@ -55,7 +53,6 @@ load (void *u) /* This should not unload the DSO. If it does, then the thread exit will result in a segfault. */ dlclose (handle); - pthread_mutex_unlock (&m); return NULL; }