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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: buffer1.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: STM32F4 Discovery, communication and libraries Date: Mon, 01 Sep 2014 21:39:52 +0300 Organization: Tidorum Ltd Message-ID: References: <60a42dc6-d8d0-4432-ae5a-86de18b82840@googlegroups.com> <5kkrv9hejn2qhdckkeo8lidkbh3bkme1gn@4ax.com> <5b91313c-acf9-4a6e-b157-6ba7c8021567@googlegroups.com> <0513ad07-6fbe-463a-be6f-097cd5113f52@googlegroups.com> <4f1ec65a-d66a-40bf-a0d6-278fde206e70@googlegroups.com> <1cjwzr30b24xy.11kpydntxhfo5$.dlg@40tude.net> <1xrcksk78afho$.xz6vgakq9o4t.dlg@40tude.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: individual.net miRjKOwNfbc9v3f+Lf6aLwm6PyKw6zCbcgl2fSD3Dmd1s2XMzK Cancel-Lock: sha1:dqqYbiS2FoS19anYgX8lorEq10s= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 In-Reply-To: Xref: number.nntp.dca.giganews.com comp.lang.ada:188781 Date: 2014-09-01T21:39:52+03:00 List-Id: On 14-09-01 19:42 , Dmitry A. Kazakov wrote: > On Sun, 31 Aug 2014 21:41:15 +0300, Niklas Holsti wrote: > >> On 14-08-31 10:02 , Dmitry A. Kazakov wrote: > >>> No_Local_Protected_Objects means all requests are pre-allocated at the >>> library level and distributed by another protected object? With busy >>> waiting for a free request? >> >> No, the _request_ in my example code is not a protected object; it is an >> ordinary record type. It _refers_ to a protected object which is a kind >> of "I/O wait object". > > That was clear. Good, but in that case your comment, quoted above, was rather misleading, because it clerly implies that requests are affected by No_Local_Protected_Object. >> For publish/subscribe, I would do something like this (not tested): > [...] > > You don't need anything this complex so long you monitor a single channel. > The challenge is to subscribe to several channels and also to avoid > unnecessary copying of I/O data. So, explain how you do it with the full Ada tasking profile, and I'll see if I can implement the same thing under Ravenscar rules. Or show a simpler solution for one channel under Ravenscar rules, that would also be interesting. I/O data copying can be avoided by passing references and using reference counting. I don't see any particular drawback of Ravenscar rules here -- one either copies data from one task to another, or refers to shared data, which then needs some sort of cross-task life-time management. > Theoretically you could create channels > that are combinations of queues of events to monitor register them by the > queues. I don't know how much overhead it will be (I was trying to reduce > number of protected actions per event), but it looks ugly and overly > complicated. General rule: a simpler, less powerful language (Ravenscar) leads to more complex application programs, when the application functionality is kept constant. You pays your money and you takes your choice. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .