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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!75g2000cwc.googlegroups.com!not-for-mail From: "REH" Newsgroups: comp.lang.ada Subject: protected type interrupts Date: 24 Aug 2006 07:47:19 -0700 Organization: http://groups.google.com Message-ID: <1156430839.745932.279060@75g2000cwc.googlegroups.com> NNTP-Posting-Host: 192.35.35.34 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1156430845 23458 127.0.0.1 (24 Aug 2006 14:47:25 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 24 Aug 2006 14:47:25 +0000 (UTC) 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: 75g2000cwc.googlegroups.com; posting-host=192.35.35.34; posting-account=lnUIyw0AAACoRB2fMF2SFTIilm8F10q2 Xref: g2news2.google.com comp.lang.ada:6339 Date: 2006-08-24T07:47:19-07:00 List-Id: I am having a disagreement with a compiler vendor. I am using a protected type for an interrupt handler (see below). The handler simply sets a boolean to true that an entry is using as a guard. The entry is called by a task. Basically, the task is blocked until signaled by the interrupt to do the processing. With newer versions of their compiler, the computer resets. They say it is because they are calling the entry at the interrupt level, and not the task level (we process this in a task because we have to do things you cannot do in a interrupt). They say the LRM allows them to do this. Is that true? I call the entry from a task, but its allow to be executed in the interrupt handler. That does not seem right. protected Interrupt_Object is procedure Isr; pragma Attach_Handler(Isr, XXX); pragma Interrupt_Priority(XXX); entry Process_Interrupt; private pragma Suppress(All_Checks, On => Isr); Triggered : Boolean := False; end Interrupt_Object; protected body Interrupt_Object is procedure Isr is begin Triggered := True; end Isr; entry Process_Interrupt when Triggered is begin Triggered := False; -- process interrrupt end Process_Interrupt; end Interrupt_Object; task body Interrupt_Task is begin loop Interrupt_Object.Process_Interrupt; end loop; end Interrupt_Task;