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!postnews.google.com!74g2000cwt.googlegroups.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada Subject: Re: protected type interrupts Date: 24 Aug 2006 12:16:25 -0700 Organization: http://groups.google.com Message-ID: <1156446985.794916.61470@74g2000cwt.googlegroups.com> References: <1156430839.745932.279060@75g2000cwc.googlegroups.com> <1156436616.384632.192250@h48g2000cwc.googlegroups.com> <1156443355.219906.237190@h48g2000cwc.googlegroups.com> NNTP-Posting-Host: 192.35.35.35 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1156446991 21744 127.0.0.1 (24 Aug 2006 19:16:31 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 24 Aug 2006 19:16:31 +0000 (UTC) In-Reply-To: <1156443355.219906.237190@h48g2000cwc.googlegroups.com> User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: 74g2000cwt.googlegroups.com; posting-host=192.35.35.35; posting-account=lnUIyw0AAACoRB2fMF2SFTIilm8F10q2 Xref: g2news2.google.com comp.lang.ada:6352 Date: 2006-08-24T12:16:25-07:00 List-Id: Adam Beneschan wrote: > REH wrote: > > > Thanks for the reference. Is your work-around valid? Isn't calling > > Relay_Object.Isr a potentially blocking operation, and thus a bad thing > > to do in an interrupt? > > I don't think it's potentially blocking... Relay_Object.Isr is a > procedure, and as I read 9.5.1, a call to a protected *procedure* is > not a potentially blocking operation unless it's done from the same > protected object. A call on a protected *entry* would be potentially > blocking. [This is from the Ada 95 manual. If this has changed in Ada > 0Y, I can't tell because www.adaic.com isn't responding.] > 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? REH