From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.50.87.7 with SMTP id t7mr1975558igz.11.1460030721156; Thu, 07 Apr 2016 05:05:21 -0700 (PDT) X-Received: by 10.182.27.8 with SMTP id p8mr18805obg.19.1460030721092; Thu, 07 Apr 2016 05:05:21 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!nt3no8600548igb.0!news-out.google.com!u9ni702igk.0!nntp.google.com!gy3no667012igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 7 Apr 2016 05:05:20 -0700 (PDT) In-Reply-To: <56ff6352-590e-4de7-a361-bc2fec0538fb@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=194.220.172.163; posting-account=C8J7NQoAAAD_ybGY7--QIRi6KpLjoH1Z NNTP-Posting-Host: 194.220.172.163 References: <56ff6352-590e-4de7-a361-bc2fec0538fb@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: How to do multiple instances of a generic packages in automated way. (using ravenscar profile) From: danielnorberto@gmail.com Injection-Date: Thu, 07 Apr 2016 12:05:21 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:30039 Date: 2016-04-07T05:05:20-07:00 List-Id: Thank you for your answer Jeff, Every buffer needs different configuration in the worst case. The most impo= rtant part of this configuration is the buffer size. Im using ada12, but i can't use synchronized-queue containers with ravensca= r profile. I tried sometime ago and several violations raised: "No_Implicit_Heap_Alloc= ations" and "No_Local_Protected objects". That's why i've decided to build= my own queue system. Thank you very much for the library you provided me. I tried to use pragmarc.queue_bounded_unprotected but it raises other viola= tion of Ravenscar: "Max_Protected_Entries =3D 1" So after that i don't have so much options to go on. I will reduce everything to explain the problem better: generic Size_bytes : integer; package buffer is protected=20 put(msg: string); Entry get(msg : out string); Private Content : string(1..size_bytes); end buffer; i will need several buffer instances (up to 1000) with different configurat= ion each one (let say only sizes). I don't know how to do it. I already have 1000 sizes configuration in one a= rray to assign to each buffer. Let's say i have the next variable already f= illed with all the configurations: Configuration_array : array (1..1000) of integer; Now i need to instance every buffer with each one of the element of that ar= ray: Package buffer1 is new (configuration_array(1)); Package buffer2 is new (configuration_array(2)); ... Package buffer1000 is new (configuration_array(1000)); but i need to do it without fill 1000 lines of code. =BFAny ideas? Thanks for your help in advance.