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!news2.google.com!newsread.com!newsstand.newsread.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!elnk-atl-nf1!newsfeed.earthlink.net!stamper.news.atl.earthlink.net!newsread3.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> <__NCe.5411$oZ.1564@newsread2.news.atl.earthlink.net> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Message-ID: Date: Wed, 20 Jul 2005 12:26:14 GMT NNTP-Posting-Host: 209.165.13.229 X-Complaints-To: abuse@earthlink.net X-Trace: newsread3.news.atl.earthlink.net 1121862374 209.165.13.229 (Wed, 20 Jul 2005 05:26:14 PDT) NNTP-Posting-Date: Wed, 20 Jul 2005 05:26:14 PDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: g2news1.google.com comp.lang.ada:3696 Date: 2005-07-20T12:26:14+00:00 List-Id: Yes, interrupt handling is platform specific, but since Ada found a way to connect a protected procedure to an interrupt, it would seem that some similar mechanism could be invented to translate a platform specific interrupt into a portable representation. I don't see how this wouldn't be in the general spirit of Ada - especially if I can hide the hardware connection in a package BODY so it can be substituted for different platforms. (Or do I need to raise the whole issue of conditional compilation again? ;-) It doesn't seem like a big leap to have some language defined "signal" abstraction that could be either hardware triggered, OS triggered or software triggered so that the protected procedure could do what it is currently doing to connect to an interrupt (connecting to the "signal" abstraction instead), but you could hide the triggering mechanism under a package body somewhere. I'm not looking to avoid having to do some code substitution between a target machine and a simulation. What I'm looking for is a mechanism that lets you hide the SOURCE of the interrupt in a package BODY so that the embedded executive developer and the workstation simulation developer can both work from a common specification and all we have to do to get off the target and on to the simulation is substitute one package body. With Ada as it stands, I'm not sure I can do that without some significant gyrations. A language defined "signal" would seem to provide a simple mechanism for doing that. MDC Robert A Duff wrote: > > The problem you're talking about is "How to deal with cases where you > need to write different code for different platforms." If the language > is well designed, and the compilers aren't too buggy, this will happen > fairly rarely. Interrupt handling is inherently platform specific, so > this is one case where you'll need platform-specific code. The usual > solutions are to use a preprocessor of some sort, or to write different > versions of the same source file, and have the build process select > among them. > > So I think no interrupt-specific language mechanism is warranted here. > > I agree with you that it would be nice to have a way to trigger an > interrupt under program control. > > - Bob -- ====================================================================== 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 ======================================================================