public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
To: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org
Subject: Committed: io/async.h: Use __gthread_mutex_t, not pthread_mutex_t.
Date: Wed, 05 Sep 2018 10:35:00 -0000	[thread overview]
Message-ID: <201809051034.w85AYtjI018659@ignucius.se.axis.com> (raw)

These pthread_mutex_t were obviously meant to be
__gthread_mutex_t.  See other declarations.  Not being that,
broke cris-elf build at r264070, restored with this patch.  Also
regtested on native x86_64-pc-linux-gnu.

I'm not sure know why no other bare-iron target saw this, but
perhaps it's because my newlib is a bit dated (...looks... yes,
looks like newlib has grown pthreads since then, but that
doesn't excuse this flaw).  Still, there may be other similar
flaws behind #ifdefs, this is just a build-fixing patch.

Committed as obvious.

libgfortran:
	* io/async.h: Use __gthread_mutex_t, not pthread_mutex_t.

Index: libgfortran/io/async.h
===================================================================
--- libgfortran/io/async.h	(revision 264070)
+++ libgfortran/io/async.h	(working copy)
@@ -337,8 +337,8 @@ struct adv_cond
 
 typedef struct async_unit
 {
-  pthread_mutex_t io_lock;   /* Lock for doing actual I/O. */
-  pthread_mutex_t lock;      /* Lock for manipulating the queue structure.  */
+  __gthread_mutex_t io_lock;   /* Lock for doing actual I/O. */
+  __gthread_mutex_t lock;      /* Lock for manipulating the queue structure.  */
   bool empty;
   struct
   {

brgds, H-P

             reply	other threads:[~2018-09-05 10:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-05 10:35 Hans-Peter Nilsson [this message]
2018-09-05 10:40 ` Bernhard Reutner-Fischer

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=201809051034.w85AYtjI018659@ignucius.se.axis.com \
    --to=hans-peter.nilsson@axis.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.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).