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 Path: g2news2.google.com!news3.google.com!news.glorb.com!proxad.net!proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: protected type interrupts Date: Fri, 25 Aug 2006 08:45:07 +0200 Organization: Adalog Message-ID: 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> <1156454170.983452.318450@m79g2000cwm.googlegroups.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1156489268 20165 195.25.228.57 (25 Aug 2006 07:01:08 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 25 Aug 2006 07:01:08 +0000 (UTC) User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) In-Reply-To: <1156454170.983452.318450@m79g2000cwm.googlegroups.com> Xref: g2news2.google.com comp.lang.ada:6370 Date: 2006-08-25T08:45:07+02:00 List-Id: Adam Beneschan a �crit : > I'm just reading what the RM says. But, although I'm not an expert at > this, I don't believe your argument makes sense given the way protected > objects are supposed to work. A task cannot, of course, access data > internal to a protected object directly; it has to call one of the PO's > subprograms or entries to get it. When it does so, then assuming > Ceiling_Locking is in effect, no other task can use the PO---but it's > not because other tasks are blocked, it's simply because the protected > action runs at a higher priority than any task that could use the PO > (and the protected action is supposed to complete very quickly). So no > mutual exclusion or blocking is necessary when calling protected > subprograms. At least I think that's how it works. > Hmmm... yes, as long as you are running on a mono-processor. But the rules must take care of multi-processors, too. In that case, there is some blocking, but it can be implemented by spin-locking, thus avoiding context switches (see my previous message). -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr