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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,ee3f38994d7d1435 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-09-07 10:51:29 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!bloom-beacon.mit.edu!nycmny1-snh1.gtei.net!cambridge1-snf1.gtei.net!news.gtei.net!inmet!not-for-mail From: Tucker Taft Newsgroups: comp.lang.ada Subject: Re: protected objects and data structures Date: Fri, 07 Sep 2001 13:51:18 -0400 Organization: AverStar (formerly Intermetrics) Burlington, MA USA Message-ID: <3B990916.D981BA9C@avercom.net> References: <20010906160537.5a761a20.tonygair@nospam.blueyonder.co.uk> <3B979A49.FF2C4731@worldnet.att.net> NNTP-Posting-Host: 192.168.24.34 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: inmet2.burl.averstar.com 999885082 1731 192.168.24.34 (7 Sep 2001 17:51:22 GMT) X-Complaints-To: usenet@inmet2.burl.averstar.com NNTP-Posting-Date: 7 Sep 2001 17:51:22 GMT X-Mailer: Mozilla 4.75 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en Xref: archiver1.google.com comp.lang.ada:12909 Date: 2001-09-07T17:51:22+00:00 List-Id: James Rogers wrote: > > Sure. > > With variant records you will need to create the linked list such that > each element is dynamically allocated and the node is initialized with > the variant being stored. This will work unless the variant record you > are allocating contains a task object. In that case the allocation is > potentially blocking. Potentially blocking operations are forbidden in > a protected operation. Just to be clear, allocation is never potentially blocking. It is the initialization of the object that might be potentially blocking. In the very rare case of putting a task inside a variant record, you could get into trouble. In general, however, it is perfectly fine to use linked lists of variant or tagged records inside protected objects. > > Jim Rogers > Colorado Springs, Colorado USA -Tucker Taft stt@avercom.net > > Tony Gair wrote: > > > > Has anyone here used a predefined ada data structure inside a protected object. > > > > My problem is that I need to store a undefined amount of variant records inside a > > protected variable / object. > > > > Any ideas -- -Tucker Taft stt@avercom.net http://www.avercom.net Chief Technology Officer, AverCom Corporation (A Titan Company) Bedford, MA USA (AverCom was formerly the Commercial Division of AverStar: http://www.averstar.com/~stt)