From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by sourceware.org (Postfix) with ESMTPS id 6EC953858D32; Mon, 3 Oct 2022 05:03:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6EC953858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ed1-x52d.google.com with SMTP id u21so8796907edi.9; Sun, 02 Oct 2022 22:03:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:from:to:cc:subject:date; bh=NLzW4Z2BYnhQD62w9BEUEC9n9H/5d4bkKuleMlqjmpE=; b=Bw9Rm1NWIdPgxaIwMXKm38Dh3FK7mY3HjDlfvaSTF/33RsyBhaA9Z/FUs03bbpQHFw mIlKwksVW/D/L/xwmK2NPj0tLJOorqufmkWgWzYTBWG6pqVzJXcqu1qnaxBPmMOXBzwn dOWyIV9MVCmE6/vfjgi/PUtwhPPn3rND4cZSZY923V7pIL9CODgwHff0k4ALzR4zQ7GS rU+xo9zU90nCpJ1QZB9FkW1Bp5GN0fDlLiid/EQF0dMCI4HD+vUDGFgDUEq6DReYZ/yL WdO/WMVHo9RXd/evr8KijF8LumgoC+ngrghvtcpsQQkW3oW2J+b9oaJyAHCpHFPIJg3n 3q0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:references :in-reply-to:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date; bh=NLzW4Z2BYnhQD62w9BEUEC9n9H/5d4bkKuleMlqjmpE=; b=2TclAfZHvt6f4ijvRZhoSBCnukR0rX3LELlGVylHY1zFYaEfYYxlz3P637tZGVL+hv EBr6BtD0G0DJZGSQEVlWCN2Ef2I+u/3wl9vlVjSrNH/xePo9w6WRjUYkb6im0DYOmLaI yBsvIqs7xU8rtHVmBhPmj7N9GHTCRT6tCkB7tjoX0QM6vtE8WBvF9qvz7l0yn1X7ZW76 cKaxIyKxOqdinC5fwPos/hGptojK8PJnXDjUcolQLKTH8jPxUTmpg6KxOKn6q9rzy6HG /HcyiunMDB8V9CE98L+FjFLizeGwm0A/8RsDAak2t4wmYaNBY56K8np4BDV65hPV31SI 65iQ== X-Gm-Message-State: ACrzQf1TispUwZfbZUa62fRyBJ18mToQS6IcJSee301AoB9zw+aHhFBN hNehLEACAoxczGdZxSWdRlk= X-Google-Smtp-Source: AMsMyM61HxqfOCPlVn/MgmXZfDtnA0zpfKpvdpbeDVoZMnOUjWLxl35gEw1tCaEUjvB5wH671IdlUw== X-Received: by 2002:a05:6402:4446:b0:457:eebd:fe52 with SMTP id o6-20020a056402444600b00457eebdfe52mr17115914edb.234.1664773433859; Sun, 02 Oct 2022 22:03:53 -0700 (PDT) Received: from ?IPv6:::1? ([2001:4bb8:129:8c08::29f3:7800]) by smtp.gmail.com with ESMTPSA id w13-20020a1709060a0d00b0078b83968ad4sm1153828ejf.24.2022.10.02.22.03.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 02 Oct 2022 22:03:52 -0700 (PDT) Date: Mon, 03 Oct 2022 07:03:47 +0200 From: Bernhard Reutner-Fischer To: LIU Hao , LIU Hao via Gcc-patches CC: fortran@gcc.gnu.org Subject: Re: Adding a new thread model to GCC In-Reply-To: <7c519f0b-2a6d-e9bf-993a-2eff2cdad418@126.com> References: <0f1f223a-3756-1da3-bd1d-b87edd34e1f9@126.com> <7116A6F3-3968-4720-A65C-FFB05BFE181D@gmail.com> <7c519f0b-2a6d-e9bf-993a-2eff2cdad418@126.com> Message-ID: <0F33BB41-41EC-4068-84F1-9AD6DCCF190A@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2 October 2022 14:54:54 CEST, LIU Hao wrote: >=E5=9C=A8 2022-10-02 04:02, Bernhard Reutner-Fischer =E5=86=99=E9=81=93: >> On 1 October 2022 20:34:45 CEST, LIU Hao via Gcc-patches wrote: >>> Greetings=2E >>=20 >>> The first patch is necessary because somewhere in libgfortran, `pthrea= d_t` is referenced=2E If the thread model is not `posix`, it fails to compi= le=2E >>=20 >> One of several shortcomings mentioned already on Sun, 02 Sep 2018 15:40= :28 -0700 in >> https://www=2Email-archive=2Ecom/gcc-patches@gcc=2Egnu=2Eorg/msg196212= =2Ehtml >>=20 > >Forgive me but I didn't get your point=2E Is the 'shortcoming' the fact t= hat `pthread_t` must be preferred to `__gthread_t`? No, sorry for my brevity=2E Using __gthread_t like in your patch is correct=2E thanks, > >For non-posix thread models, is not included, so `pthread_t= ` is not declared=2E I haven't looked at other code in libgfortran, but cha= nging `pthread_t` to `__gthread_t` does allow libgfortran to build=2E I don= 't know how to test it though, as I don't write Fortran myself=2E > >