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: a07f3367d7,6349d4dc47b70bc0,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!postnews.google.com!n20g2000prc.googlegroups.com!not-for-mail From: usenet@scriptoriumdesigns.com Newsgroups: comp.lang.ada Subject: Basic critical sections question Date: Sat, 3 Jul 2010 13:06:24 -0700 (PDT) Organization: http://groups.google.com Message-ID: <71385df3-5fec-49b9-9d7a-98cb95a346ed@n20g2000prc.googlegroups.com> NNTP-Posting-Host: 76.216.160.90 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1278187585 6502 127.0.0.1 (3 Jul 2010 20:06:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 3 Jul 2010 20:06:25 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n20g2000prc.googlegroups.com; posting-host=76.216.160.90; posting-account=H7NWPAoAAABNzgi4DMy1pgNsNq9QU0H_ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.30729; .NET CLR 3.0.30729; .NET4.0C; .NET4.0E; AskTB5.2),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:12167 Date: 2010-07-03T13:06:24-07:00 List-Id: 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.