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,e6066104d6deadff X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s71.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" Organization: jrcarter at acm dot org User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: protected type interrupts References: <1156430839.745932.279060@75g2000cwc.googlegroups.com> <1156436616.384632.192250@h48g2000cwc.googlegroups.com> <1156443355.219906.237190@h48g2000cwc.googlegroups.com> <1156446985.794916.61470@74g2000cwt.googlegroups.com> In-Reply-To: <1156446985.794916.61470@74g2000cwt.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <%%qHg.107121$FQ1.41394@attbi_s71> NNTP-Posting-Host: 12.201.97.176 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s71 1156463739 12.201.97.176 (Thu, 24 Aug 2006 23:55:39 GMT) NNTP-Posting-Date: Thu, 24 Aug 2006 23:55:39 GMT Date: Thu, 24 Aug 2006 23:55:39 GMT Xref: g2news2.google.com comp.lang.ada:6366 Date: 2006-08-24T23:55:39+00:00 List-Id: REH wrote: > > I don't understand. How can a procedure within a protected object > modify data internal to the object in a thread-safe way without the > potentially blocking effect of enforcing mutual exclusion? If one task > is "using" the object, and another calls one of the object's > procedures, would the second task not be blocked until the first one > exits the object? In the terms of the ARM, mutual exclusion is not considered potentially blocking. Only waiting for data synchronization is potentially blocking. Since protected actions are supposed to be short and quick, and cannot perform potentially blocking operations, mutual exclusion cannot delay a task for very long. On the other hand, waiting for an entry barrier to become true can take forever. Many external actions, such as I/O, are also considered potentially blocking. -- Jeff Carter "Now go away or I shall taunt you a second time." Monty Python & the Holy Grail 07