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,a9bbfb8cd49f1a51 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!atl-c03.usenetserver.com!news.usenetserver.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread2.news.atl.earthlink.net.POSTED!d9c68f36!not-for-mail From: Marin David Condic User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax) X-Accept-Language: en-us, en MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Isn't this in favour of Ada?? References: <42d64dde$0$64794$edfadb0f@dread12.news.tele.dk> <8764vcdv2f.fsf@deneb.enyo.de> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: <__NCe.5411$oZ.1564@newsread2.news.atl.earthlink.net> Date: Mon, 18 Jul 2005 13:18:50 GMT NNTP-Posting-Host: 209.165.22.150 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1121692730 209.165.22.150 (Mon, 18 Jul 2005 06:18:50 PDT) NNTP-Posting-Date: Mon, 18 Jul 2005 06:18:50 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news1.google.com comp.lang.ada:3659 Date: 2005-07-18T13:18:50+00:00 List-Id: Yes and No. Yes, you can tie an interrupt handler to a system signal as if it were the same as a hardware interrupt. No, in that I'd like another layer of abstraction. I want to separate the system dependent signal from the system-independent response. Think about it this way: Interfacing to hardware these days typically involves three things: Reading from some special addresses, writing to some special addresses and responding to some hardware interrupts. So I might isolate my hardware beneath a package that looks like this: package HW_Isolator is Some_Interrupt : signal ; -- Not really Ada - but like an exception. procedure Read (blah) ; procedure Write (blah) ; end HW_Isolator ; If I have some way of connecting task entries or protected type procedures to "Sime_Interrupt" and have a language mechanism similar to exception propogation (as in "raise Some_Interrupt ;") then beneath the package HW_Isolator I can either a) connect Some_Interrupt directly to the hardware or b) connect it to a simulation of the hardware running on a PC. My embedded code othewrwise functions identically running on the real processor and running in an off-line simulation. Presumably, having the ability to do something like "raise Some_Interrupt ;" anywhere in your code and have it asynchronously trigger execution of some other logic would be of advantage beyond hardware isolation, but I have not given that much thought. Perhaps it might be viewed as "Dangerous" as well? MDC Ed Falis wrote: > > With GNAT, the RM mechanisms for handling interrupts are used for > signals on "native" platforms, so you should be able to do something > like what you want now. > > - Ed -- ====================================================================== Marin David Condic I work for: http://www.belcan.com/ My project is: http://www.jsf.mil/NSFrames.htm Send Replies To: m o d c @ a m o g c n i c . r "The Christian ideal has not been tried and found wanting. It has been found difficult; and left untried." -- G. K. Chesterton ======================================================================