comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Buffer PO
Date: Fri, 3 Jun 2016 21:10:27 +0200
Date: 2016-06-03T21:10:27+02:00	[thread overview]
Message-ID: <nisknb$1bu7$1@gioia.aioe.org> (raw)
In-Reply-To: 1bc41b66-8dd4-4b4e-903e-f314babc07f9@googlegroups.com

On 2016-06-03 15:29, tonyg wrote:

> I have a Fifo buffer in a protect object with a push / pop procedures and an is_empty function storing a gaggle of variant records.

Put the protected object into the container not otherwise.

The pop operation will go:

1. lock the container (entry call)
2. pop the result in a task-unsafe way onto the stack
3. release the container (protected procedure call)
4. return the result from the stack

This will alow you to re-use any exiting task-unsafe container 
implementation you wanted.

The lock can be made re-entrant, BTW.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  parent reply	other threads:[~2016-06-03 19:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-03 13:29 Buffer PO tonyg
2016-06-03 15:35 ` Anh Vo
2016-06-03 16:20 ` Mark Lorenzen
2016-06-03 17:48 ` Jeffrey R. Carter
2016-06-03 19:10 ` Dmitry A. Kazakov [this message]
2016-06-04 11:49 ` tonyg
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox