mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
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.
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
2015-07-10 Siddhesh Poyarekar <siddhesh@redhat.com>
|
2015-07-10 Siddhesh Poyarekar <siddhesh@redhat.com>
|
||||||
|
|
||||||
|
* stdlib/tst-tls-atexit.c (load): Remove unnecessary mutex
|
||||||
|
locks.
|
||||||
|
|
||||||
* stdlib/tst-tls-atexit.c (load): Avoid boolean coercion.
|
* stdlib/tst-tls-atexit.c (load): Avoid boolean coercion.
|
||||||
|
|
||||||
2015-07-10 Torvald Riegel <triegel@redhat.com>
|
2015-07-10 Torvald Riegel <triegel@redhat.com>
|
||||||
|
@@ -29,12 +29,10 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
void *handle;
|
void *handle;
|
||||||
pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER;
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
load (void *u)
|
load (void *u)
|
||||||
{
|
{
|
||||||
pthread_mutex_lock (&m);
|
|
||||||
handle = dlopen ("$ORIGIN/tst-tls-atexit-lib.so", RTLD_LAZY);
|
handle = dlopen ("$ORIGIN/tst-tls-atexit-lib.so", RTLD_LAZY);
|
||||||
if (handle == NULL)
|
if (handle == NULL)
|
||||||
{
|
{
|
||||||
@@ -55,7 +53,6 @@ load (void *u)
|
|||||||
/* This should not unload the DSO. If it does, then the thread exit will
|
/* This should not unload the DSO. If it does, then the thread exit will
|
||||||
result in a segfault. */
|
result in a segfault. */
|
||||||
dlclose (handle);
|
dlclose (handle);
|
||||||
pthread_mutex_unlock (&m);
|
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user