-- --
-- S p e c --
-- --
--- --
--- Copyright (C) 1995-2002 Florida State University --
+-- Copyright (C) 1991-1994, Florida State University --
+-- Copyright (C) 1995-2004, Ada Core Technologies --
-- --
-- GNARL is free software; you can redistribute it and/or modify it under --
-- terms of the GNU General Public License as published by the Free Soft- --
-- however invalidate any other reasons why the executable file might be --
-- covered by the GNU Public License. --
-- --
--- GNARL was developed by the GNARL team at Florida State University. It is --
--- now maintained by Ada Core Technologies, Inc. (http://www.gnat.com). --
+-- GNARL was developed by the GNARL team at Florida State University. --
+-- Extensive contributions were provided by Ada Core Technologies, Inc. --
-- --
------------------------------------------------------------------------------
type Access_Node is access all Node;
-- This needs comments ???
+ function To_Access_Node is new Unchecked_Conversion
+ (Access_Address, Access_Node);
+ -- Used to fetch pointer to indirect attribute list. Declaration is
+ -- in spec to avoid any problems with aliasing assumptions.
+
type Dummy_Wrapper;
type Access_Dummy_Wrapper is access all Dummy_Wrapper;
+ pragma No_Strict_Aliasing (Access_Dummy_Wrapper);
+ -- Needed to avoid possible incorrect aliasing situations from
+ -- instantiation of Unchecked_Conversion in body of Ada.Task_Attributes.
+
for Access_Dummy_Wrapper'Storage_Size use 0;
- -- This is a stand-in for the generic type Wrapper defined in
- -- Ada.Task_Attributes. The real objects allocated are always
+ -- Access_Dummy_Wrapper is a stand-in for the generic type Wrapper defined
+ -- in Ada.Task_Attributes. The real objects allocated are always
-- of type Wrapper, no Dummy_Wrapper objects are ever created.
type Deallocator is access procedure (P : in out Access_Node);
-- The generic formal type, may be controlled
end record;
+ for Dummy_Wrapper'Alignment use Standard'Maximum_Alignment;
+ -- A number of unchecked conversions involving Dummy_Wrapper_Access
+ -- sources are performed in other units (e.g. Ada.Task_Attributes).
+ -- Ensure that the designated object is always strictly enough aligned.
+
In_Use : Direct_Index_Vector := 0;
-- is True for direct indices that are already used.
-- A linked list of all indirectly access attributes,
-- which includes all those that require finalization.
- procedure Initialize_Attributes (T : Task_ID);
+ procedure Initialize_Attributes (T : Task_Id);
-- Initialize all attributes created via Ada.Task_Attributes for T.
-- This must be called by the creator of the task, inside Create_Task,
-- via soft-link Initialize_Attributes_Link. On entry, abortion must
-- be deferred and the caller must hold no locks
- procedure Finalize_Attributes (T : Task_ID);
+ procedure Finalize_Attributes (T : Task_Id);
-- Finalize all attributes created via Ada.Task_Attributes for T.
-- This is to be called by the task after it is marked as terminated
-- (and before it actually dies), inside Vulnerable_Free_Task, via the