public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libgfortran: Use `__gthread_t` instead of `pthread_t`
@ 2022-05-27 15:18 LIU Hao
  0 siblings, 0 replies; only message in thread
From: LIU Hao @ 2022-05-27 15:18 UTC (permalink / raw)
  To: GCC Patches


[-- Attachment #1.1.1: Type: text/plain, Size: 126 bytes --]

The attached patch addresses a build issue when <pthread.h> is not included. Please review.


-- 
Best regards,
LIU Hao

[-- Attachment #1.1.2: 0001-libgfortran-Use-__gthread_t-instead-of-pthread_t.patch --]
[-- Type: text/plain, Size: 993 bytes --]

From 7b573e4cdb7c3b666baac4c38046c64a01b6dcb5 Mon Sep 17 00:00:00 2001
From: LIU Hao <lh_mouse@126.com>
Date: Fri, 27 May 2022 23:12:48 +0800
Subject: [PATCH] libgfortran: Use `__gthread_t` instead of `pthread_t`

It used to cause errors if a thread model other than `posix` was selected,
which looks like a leftover from a79878585a1c5e32bafbc6d1e73f91fd6e4293bf.

2022-05-27  LIU Hao <lh_mouse@126.com>

libgfortran/
	* io/async.h (struct async_unit): Use `__gthread_t` instead
	of `pthread_t`.
---
 libgfortran/io/async.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgfortran/io/async.h b/libgfortran/io/async.h
index efd542a45e8..d57722a95e4 100644
--- a/libgfortran/io/async.h
+++ b/libgfortran/io/async.h
@@ -351,7 +351,7 @@ typedef struct async_unit
   struct adv_cond work;
   struct adv_cond emptysignal;
   struct st_parameter_dt *pdt;
-  pthread_t thread;
+  __gthread_t thread;
   struct transfer_queue *head;
   struct transfer_queue *tail;
 
-- 
2.20.1


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 840 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-05-27 15:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-27 15:18 [PATCH] libgfortran: Use `__gthread_t` instead of `pthread_t` LIU Hao

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).