Message ID | 20241025091107.485741-20-poulhies@adacore.com |
---|---|
State | Committed |
Commit | 8af9169fcf792531ca7bbaac80d15123c7970f06 |
Headers |
Return-Path: <gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 896A93858416 for <patchwork@sourceware.org>; Fri, 25 Oct 2024 09:17:57 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wr1-x436.google.com (mail-wr1-x436.google.com [IPv6:2a00:1450:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 6ACB93858C53 for <gcc-patches@gcc.gnu.org>; Fri, 25 Oct 2024 09:11:42 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 6ACB93858C53 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 6ACB93858C53 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::436 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729847522; cv=none; b=UDS5J/57zwjZQG/QJUeTf2fwX91r4FsTKSpwtRU07641MwgO2y6Z5B9bG0jNKtknKlDqQIB+ZGq1vLC/5J+Pf5Cbrl7qLTBSAgEAc92K86RWusLgZqYIC5m5gxxwzxy5h9HnF7TmP0AbavCHn9vXM8WBmCO6RcSzWMVU2/YRqrQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1729847522; c=relaxed/simple; bh=d3GcZsQyOAOwfTQG7ST9YjNgfT/s2weKaIXo6g49qJY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=MKms/fn4YSUyA8iNvxrLLqQ1Ji4421HMDJ5FVnTH/XcWF7g2QChclGVdpEZww7Vv00Q788ll5uYr14DWBjw3DDAb86UIRzWSusz4X3LJfZV1TL2HOfx2IzxXgr5Bl0/McKjoyC4Kzm1hGOcJAh6YavLWX0Sq6DIyzDN5OyzdHX0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-37d4ba20075so1199487f8f.0 for <gcc-patches@gcc.gnu.org>; Fri, 25 Oct 2024 02:11:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; t=1729847501; x=1730452301; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rUhWCW5vFxMXKzd3BQQrZ8Jen88g6H7L4BTCwoiXHKc=; b=WtOOooe3q1WOelhW+XH9/6IGtrqfc57jqYxEf3/9qGsRLMnHCUc2as0XvJS5I7RwKo 8aEMq8bsk6Nxf+KAN//x6nlOEP0ZsfGQ2KuxhMd2yj3ek6FSdri8Vd8eitiiMxV9Xm17 c7MymlskR/3xy0XWaBE407z8QNEaOQftlfYPj5sP2OY01wOISCCC8ioUoZhiz9f8e0zx becPdlse23m76uM1jxk2d95Vs5sZkY8oAi4DjzlVAOzSP/7+N0YBynPQOPly/rWZ54Zj rsLoYzLP4FJ96cwjmaACR8T/xHiWt2zc/UPf7fslWFrSrHrOsxo2CSprd+7HXvzS0ewU JjrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729847501; x=1730452301; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rUhWCW5vFxMXKzd3BQQrZ8Jen88g6H7L4BTCwoiXHKc=; b=rYeFjpOMGEz4e2/uc50o3IY1RCG6neqHyqXdp6MWFO1AaCPRX8si4nM8FR26kBegpv 9J1oBVWi6bNeGBWmB3vaNo7gjtwBFM8D3YOYSfQ/0Z0Uby+yyq3xXVLARp+r6X3s0YQ9 oAAsjKdcfkUrQwi5O2DArMKLo8jW/YniAyeP+7gv67IIWFEXXtRXGXK1il4VMmUpw1qC t0q3KMgoPul4Bqs+uS6x2rPu7F+kRxrBOqiqXjkbvYoQKGGw7beI7s4JYizYmGTsHTd3 86Cw3pCMqWkCSvlYQXPspPEcC19blZyOx0qtx7NYFdcVA/YgJwgetgusAh53gPtwiMVx ADRA== X-Gm-Message-State: AOJu0Yz4ijhj3x1wQHYO+pvrD6x3EmIo5a2mS4d5h/CLb768OHxaxLDV 2uTs0IXcVK6z0BQ4lhSb4hiWDS3TV3iPMWFYmMl1AJc1nXrAUkcSW2IEH9W9jZTrk023HfzUqTk = X-Google-Smtp-Source: AGHT+IHiaaz+6rOVL/ooCN90TPAWVjNnsroGEj7Fwc61kotDrWgoO/AY1/xUqOQw+TnXJL3TTMHP/w== X-Received: by 2002:a05:6000:4581:b0:37d:41df:136b with SMTP id ffacd0b85a97d-37efcf06102mr5497890f8f.13.1729847501032; Fri, 25 Oct 2024 02:11:41 -0700 (PDT) Received: from localhost.localdomain ([2001:861:3382:1a90:2626:b78c:6271:6c01]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b47aa8sm1013079f8f.51.2024.10.25.02.11.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2024 02:11:40 -0700 (PDT) From: =?utf-8?q?Marc_Poulhi=C3=A8s?= <poulhies@adacore.com> To: gcc-patches@gcc.gnu.org Cc: Eric Botcazou <ebotcazou@adacore.com> Subject: [COMMITTED 20/35] ada: Fix ATC with timed delay from Ada.Real_Time Date: Fri, 25 Oct 2024 11:10:49 +0200 Message-ID: <20241025091107.485741-20-poulhies@adacore.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241025091107.485741-1-poulhies@adacore.com> References: <20241025091107.485741-1-poulhies@adacore.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-13.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> Errors-To: gcc-patches-bounces~patchwork=sourceware.org@gcc.gnu.org |
Series |
[COMMITTED,01/35] ada: Pass parameters of full access unconstrained array types by copy in calls
|
|
Commit Message
Marc Poulhiès
Oct. 25, 2024, 9:10 a.m. UTC
From: Eric Botcazou <ebotcazou@adacore.com>
An Asynchronous Transfer of Control blocks with a timed delay that is
computed by means of the Ada.Real_Time unit (instead of the default
Ada.Calendar unit) because of a missing abort deferral in the unit.
gcc/ada/ChangeLog:
PR ada/43485
* libgnarl/a-retide.adb: Add with clause for System.Soft_Links.
(Delay_Until): Defer and undefer abort around the call to the
Timed_Delay routine of System.Task_Primitives.Operations.
Tested on x86_64-pc-linux-gnu, committed on master.
---
gcc/ada/libgnarl/a-retide.adb | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/ada/libgnarl/a-retide.adb b/gcc/ada/libgnarl/a-retide.adb index 80e3d31ed17..d7cac0f2124 100644 --- a/gcc/ada/libgnarl/a-retide.adb +++ b/gcc/ada/libgnarl/a-retide.adb @@ -31,11 +31,13 @@ with Ada.Exceptions; +with System.Soft_Links; with System.Tasking; with System.Task_Primitives.Operations; package body Ada.Real_Time.Delays is + package SSL renames System.Soft_Links; package STPO renames System.Task_Primitives.Operations; ---------------- @@ -62,7 +64,9 @@ package body Ada.Real_Time.Delays is Ada.Exceptions.Raise_Exception (Program_Error'Identity, "potentially blocking operation"); else + SSL.Abort_Defer.all; STPO.Timed_Delay (Self_Id, To_Duration (T), Absolute_RT); + SSL.Abort_Undefer.all; end if; end Delay_Until;