From patchwork Wed Nov 18 12:58:58 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1402233 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4CbjYt1XTjz9s1l for ; Wed, 18 Nov 2020 23:59:12 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4A1D1385783E; Wed, 18 Nov 2020 12:59:09 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com [68.232.141.98]) by sourceware.org (Postfix) with ESMTPS id CB707385800A for ; Wed, 18 Nov 2020 12:59:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org CB707385800A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Tobias_Burnus@mentor.com IronPort-SDR: fKwtzjBHHQb5C92NXP01UY0f9lF56/EnX+5GL9xHnmBHSOP/b2dFlhgccEWCc1XdFOEWvSz4wy spyGMwcIF5ypXdK1iNGI8qVVqoR1hX4SNpzwrnnmkJuACG1khSe1IoAzEkdFEs27FtLY14eaWs MrC/KpNAYILI1m/Pb2nwCq2Tu/Rq0bhrbx5pqHBKZu48iqO/UcNLut6REtlbPR58iSERbUV1RI GrDrfcUpZCk1SeFXuBDyq/JmkH3h2KyceMYGN83iNnWDzBU9BoPQ9gUuUNWQ2kdWPdFBkW+boM T4U= X-IronPort-AV: E=Sophos;i="5.77,486,1596528000"; d="diff'?scan'208";a="55217994" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 18 Nov 2020 04:59:04 -0800 IronPort-SDR: wwO2D97Bq0G4Ly8RQ3SQCH1OmLn01xPwxbs2DmSOh9XeSyxB+gjDk3lBLaaPIkctMK+L8zwlqc SMaeFwOLFH5XPlCknW9AUh9C6x1TDUkbgN3kCOQkouZiNtlAmIHTwoLw3aV6FxIOe85LNtEIMB SEeLS8KR8LRPQ3DWiOUnpU7z8Rju+MVLYkGfmalWcpFAgO8lpYKxwPKELIsLKMyUMwCwq9QgtQ QzLrQ9sClEQfNnjhGgQuy3iCf0Z1omWFPVmRuSfwFt7GyaCYZaFKXQ5xLH9C7YOfEUFchla1sO Jw4= To: gcc-patches , Jakub Jelinek , Andrew Stubbs From: Tobias Burnus Subject: [Patch] testsuite/libgomp.c/usleep.h: Use sleep-loop also for GCN Message-ID: <43fa72ec-a4d3-bc26-b744-21dbfa135d4c@codesourcery.com> Date: Wed, 18 Nov 2020 13:58:58 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 Content-Language: en-US X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: SVR-IES-MBX-03.mgc.mentorg.com (139.181.222.3) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, GIT_PATCH_0, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" At least here newlib is build without HAVE_POSIX / 'posix' subdirectory and, hence, among others without 'usleep'. For nvptx, the same issue exists – and there 'omp declare variant' is used to call a burn-cycles loop as replacement. Affects target-32.c and thread-limit-2.c. OK? Tobias ----------------- Mentor Graphics (Deutschland) GmbH, Arnulfstraße 201, 80634 München / Germany Registergericht München HRB 106955, Geschäftsführer: Thomas Heurung, Alexander Walter testsuite/libgomp.c/usleep.h: Use sleep-loop also for GCN As typically configured, newlib's libc.a does not build 'posix' and, hence, usleep is not available. Thus, use the same fallback as for nvptx. libgomp/ * testsuite/libgomp.c/usleep.h (nvptx_usleep): Also use for device={arch(gcn)}. diff --git a/libgomp/testsuite/libgomp.c/usleep.h b/libgomp/testsuite/libgomp.c/usleep.h index c01aaa0a88f..1535ad06201 100644 --- a/libgomp/testsuite/libgomp.c/usleep.h +++ b/libgomp/testsuite/libgomp.c/usleep.h @@ -14,6 +14,7 @@ nvptx_usleep (useconds_t d) } #pragma omp declare variant (nvptx_usleep) match(construct={target},device={arch(nvptx)}) +#pragma omp declare variant (nvptx_usleep) match(construct={target},device={arch(gcn)}) #pragma omp declare variant (usleep) match(user={condition(1)}) int tgt_usleep (useconds_t d)