+2019-07-04 Joffrey Huguet <huguet@adacore.com>
+
+ * libgnarl/a-taside.ads: Add assertion policy to ignore
+ preconditions.
+ (Abort_Task, Is_Terminated, Is_Callable): Add preconditions.
+
2019-07-04 Eric Botcazou <ebotcazou@adacore.com>
* doc/gnat_rm/implementation_defined_pragmas.rst: Fix
-- --
------------------------------------------------------------------------------
+-- Preconditions in this unit are meant for analysis only, not for run-time
+-- checking, so that the expected exceptions are raised.
+-- This is enforced by setting the corresponding assertion policy to Ignore.
+
+pragma Assertion_Policy (Pre => Ignore);
+
with System;
with System.Tasking;
pragma Inline (Environment_Task);
procedure Abort_Task (T : Task_Id) with
+ Pre => T /= Null_Task_Id,
Global => null;
pragma Inline (Abort_Task);
-- Note: parameter is mode IN, not IN OUT, per AI-00101
function Is_Terminated (T : Task_Id) return Boolean with
Volatile_Function,
+ Pre => T /= Null_Task_Id,
Global => Tasking_State;
pragma Inline (Is_Terminated);
function Is_Callable (T : Task_Id) return Boolean with
Volatile_Function,
+ Pre => T /= Null_Task_Id,
Global => Tasking_State;
pragma Inline (Is_Callable);