From patchwork Fri Apr 12 12:48:25 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 236079 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "localhost", Issuer "www.qmailtoaster.com" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 112E12C009C for ; Fri, 12 Apr 2013 22:48:42 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=Z44N283XI8Mc3osU5G8+ebCGtdnQ/JA8vCZsPA8alFQBvdfMd8 r6jFrGGb7ci2xrb9SEKUNiVGuftQsoVImO5GmOidnJv6jhXdGogGRQ4sGOWYi0dj 47rJAkQ0Fd9sh/SQqe+s7vhRM/kym05B8dx2svhDjo5AltK8ynkrSQnxI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=VnLBUm3wg92fi/yXPhCXJtn4300=; b=NN4YmdC2WYjVM45m/Z9f iBwqhxqQMQqxoTcXRAXx9k9wpw9TIBTjr0DCOMS8urq0KSV9P9hPMnyKJGlW9wNK xW7UR6kEgRObiy9xybnKzpiWGdn7BKBvp6SLv2nt/y/JYzthwqfKDpKx/AnliZSM EP6pubVH0PeBwD5RnVwB5KY= Received: (qmail 11004 invoked by alias); 12 Apr 2013 12:48:27 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 10967 invoked by uid 89); 12 Apr 2013 12:48:27 -0000 X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL, BAYES_00, KAM_ADVERT2, RCVD_IN_HOSTKARMA_NO autolearn=no version=3.3.1 Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Fri, 12 Apr 2013 12:48:27 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 692012E8F0; Fri, 12 Apr 2013 08:48:25 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fRlYtZX1CN2m; Fri, 12 Apr 2013 08:48:25 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id 486F12E0E8; Fri, 12 Apr 2013 08:48:25 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id 478003FF09; Fri, 12 Apr 2013 08:48:25 -0400 (EDT) Date: Fri, 12 Apr 2013 08:48:25 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Robert Dewar Subject: [Ada] Allow System.Multiprocessors[.Dispatching_Domains] in Ada 95 Message-ID: <20130412124825.GA11674@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Found: No We are allowed to add implementation defined children to System, so this patch takes advantage of that to make the Ada 2012 units System.Multiprocessors and System.Multiprocessors.Dispatching_Domains available in Ada 95 and Ada 2005 modes (like all child units, they cannot be directly with'ed from Ada 83 units. Tested on x86_64-pc-linux-gnu, committed on trunk 2013-04-12 Robert Dewar * impunit.adb: Add s-multip and s-mudido to list of impl defined system units. * gnat_rm.texi: Add documentation for System.Multiprocessors[.Dispatching_Domains]. Index: gnat_rm.texi =================================================================== --- gnat_rm.texi (revision 197897) +++ gnat_rm.texi (working copy) @@ -548,6 +548,8 @@ * System.Address_Image (s-addima.ads):: * System.Assertions (s-assert.ads):: * System.Memory (s-memory.ads):: +* System.Multiprocessors (s-multip.ads):: +* System.Multiprocessors.Dispatching_Domains (s-mudido.ads):: * System.Partition_Interface (s-parint.ads):: * System.Pool_Global (s-pooglo.ads):: * System.Pool_Local (s-pooloc.ads):: @@ -15508,6 +15510,8 @@ * System.Address_Image (s-addima.ads):: * System.Assertions (s-assert.ads):: * System.Memory (s-memory.ads):: +* System.Multiprocessors (s-multip.ads):: +* System.Multiprocessors.Dispatching_Domains (s-mudido.ads):: * System.Partition_Interface (s-parint.ads):: * System.Pool_Global (s-pooglo.ads):: * System.Pool_Local (s-pooloc.ads):: @@ -16970,6 +16974,22 @@ calls to this unit may be made for low level allocation uses (for example see the body of @code{GNAT.Tables}). +@node System.Multiprocessors (s-multip.ads) +@section @code{System.Multiprocessors} (@file{s-multip.ads}) +@cindex @code{System.Multiprocessors} (@file{s-multip.ads}) +@cindex Multiprocessor interface +This is an Ada 2012 unit defined in the Ada 2012 Reference Manual, but +in GNAT we also make it available in Ada 95 and Ada 2005 (where it is +technically an implementation-defined addition). + +@node System.Multiprocessors.Dispatching_Domains (s-mudido.ads) +@section @code{System.Multiprocessors.Dispatching_Domains} (@file{s-mudido.ads}) +@cindex @code{System.Multiprocessors.Dispatching_Domains} (@file{s-mudido.ads}) +@cindex Multiprocessor interface +This is an Ada 2012 unit defined in the Ada 2012 Reference Manual, but +in GNAT we also make it available in Ada 95 and Ada 2005 (where it is +technically an implementation-defined addition). + @node System.Partition_Interface (s-parint.ads) @section @code{System.Partition_Interface} (@file{s-parint.ads}) @cindex @code{System.Partition_Interface} (@file{s-parint.ads}) Index: impunit.adb =================================================================== --- impunit.adb (revision 197897) +++ impunit.adb (working copy) @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2000-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 2000-2013, Free Software Foundation, Inc. -- -- -- -- GNAT 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- -- @@ -380,8 +380,15 @@ ("s-ststop", F), -- System.Strings.Stream_Ops ("s-tasinf", F), -- System.Task_Info ("s-wchcnv", F), -- System.Wch_Cnv - ("s-wchcon", F)); -- System.Wch_Con + ("s-wchcon", F), -- System.Wch_Con + -- The following are strictly speaking Ada 2012 units, but we are allowed + -- to add children to system, so we consider them to be implementation + -- defined additions to System in earlier versions of Ada. + + ("s-multip", T), -- System.Multiprocessors + ("s-mudido", T)); -- System.Multiprocessors.Dispatching_Domains + -------------------- -- Ada 2005 Units -- -------------------- @@ -544,8 +551,6 @@ -- The following units should be used only in Ada 2012 mode Non_Imp_File_Names_12 : constant File_List := ( - ("s-multip", T), -- System.Multiprocessors - ("s-mudido", T), -- System.Multiprocessors.Dispatching_Domains ("s-stposu", T), -- System.Storage_Pools.Subpools ("a-cobove", T), -- Ada.Containers.Bounded_Vectors ("a-cbdlli", T), -- Ada.Containers.Bounded_Doubly_Linked_Lists