public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar <siddhesh@redhat.com>
To: libc-alpha@sourceware.org
Subject: [COMMITTED PATCH] Remove unnecessary mutex locks from tst-tls-atexit test case
Date: Fri, 10 Jul 2015 17:59:00 -0000	[thread overview]
Message-ID: <20150710175938.GA13665@spoyarek.pnq.redhat.com> (raw)

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.

Committed as obvious.

Siddhesh

---
 ChangeLog               | 3 +++
 stdlib/tst-tls-atexit.c | 3 ---
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 8ee61d6..0c7fc2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 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.
 
 2015-07-10  Torvald Riegel  <triegel@redhat.com>
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 <errno.h>
 
 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;
 }
-- 
2.4.3

                 reply	other threads:[~2015-07-10 17:59 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150710175938.GA13665@spoyarek.pnq.redhat.com \
    --to=siddhesh@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).