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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d495ab2e69ad1962 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news1.google.com!news.glorb.com!news.ecp.fr!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Ravenscar-compliant bounded buffer Date: Wed, 05 Sep 2007 10:30:09 +0200 Organization: Adalog Message-ID: References: <1188914005.607732.277400@57g2000hsv.googlegroups.com> <1xnpics66h1c9.js3eyt5bsx1e.dlg@40tude.net> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1188982864 15805 195.25.228.57 (5 Sep 2007 09:01:04 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Wed, 5 Sep 2007 09:01:04 +0000 (UTC) User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <1xnpics66h1c9.js3eyt5bsx1e.dlg@40tude.net> Xref: g2news2.google.com comp.lang.ada:1748 Date: 2007-09-05T10:30:09+02:00 List-Id: Dmitry A. Kazakov a �crit : > P.S. As a general note. This object might interesting as an exercise, but > not likely needed. In a real application it would be strange to expect > multiple consumers taking integers out of buffer in some unpredictable > order. Normally, it is so that either there is one producer and one or many > consumers (like in distribution of jobs), or else there is many producers > and one consumer (like writing to log file). This might sufficiently > simplify the design. Yet another variant is multiple consumers receiving > whole waveform of integers put to the buffer (broadcasting). This would be > more difficult. > Anyway, your solution is Ravenscar compliant only if there is exactly one producer and one consumer, otherwise there is a possibility of having more than one task on the entry queue. For those who might wonder: The limitation on only one task per queue is intended to guarantee bounded waiting time. Any solution that tries to work around the Ravenscar rules in order to have longer queues will violate this restriction at some point, or have to manage explicit lists - thus violating the spirit of the profile! -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr