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,6349d4dc47b70bc0 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!aioe.org!not-for-mail From: "John B. Matthews" Newsgroups: comp.lang.ada Subject: Re: Basic critical sections question Date: Sat, 03 Jul 2010 17:48:54 -0400 Organization: The Wasteland Message-ID: References: <71385df3-5fec-49b9-9d7a-98cb95a346ed@n20g2000prc.googlegroups.com> NNTP-Posting-Host: LQJtZWzu+iKlBROuDg+IUg.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Xref: g2news2.google.com comp.lang.ada:13140 Date: 2010-07-03T17:48:54-04:00 List-Id: In article <71385df3-5fec-49b9-9d7a-98cb95a346ed@n20g2000prc.googlegroups.com>, usenet@scriptoriumdesigns.com wrote: > Suppose I have a multi-tasking system where different tasks may > execute a sequence like > > P1(A,B); > P2(C,D); > P3(E,F); > > and I want to make this sequence a critical section. What is the > typical Ada way to do this? Would I wrap P1, P2 and P3 in a > protected object and call as follows (perhaps creating a record to > hold A..F to make things a bit cleaner)? > > PO.P(A,B,C,D,E,F); > > Or if not that, what? Thanks. Looks like what it was designed for. See also, -- John B. Matthews trashgod at gmail dot com