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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: FIFO Date: Sun, 17 Sep 2017 10:46:02 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="7d2f5cb61236af332988d4d26cec5c77"; logging-data="12822"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18yC9mPj6Ju/jUZjmDVA3syplJoYD6pniE=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (darwin) Cancel-Lock: sha1:MuM6UHaLCblENxlX4veFth5XtfQ= sha1:T0NFTC3tcXKWnpRuuq6hCxbddMQ= Xref: news.eternal-september.org comp.lang.ada:48166 Date: 2017-09-17T10:46:02+01:00 List-Id: Robert A Duff writes: > Frank Buss writes: > >> I need a FIFO with a fixed size,... > > Does Ada.Containers.Bounded_Synchronized_Queues meet your needs? > > - Bob The implementation in GNAT GPL 2017 is not legal under Ravenscar restrictions (the protected type Queue has two entries). Also, what's the behaviour when the queue is already full? It blocks on Enqueue, which would be a Bad Idea if called from an interrupt handler.