comp.lang.ada
 help / color / mirror / Atom feed
From: Marin David Condic <nobody@noplace.com>
Subject: Re: Isn't this in favour of Ada??
Date: Mon, 18 Jul 2005 13:18:50 GMT
Date: 2005-07-18T13:18:50+00:00	[thread overview]
Message-ID: <__NCe.5411$oZ.1564@newsread2.news.atl.earthlink.net> (raw)
In-Reply-To: <op.st30xdyu5afhvo@localhost>

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
======================================================================



  reply	other threads:[~2005-07-18 13:18 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-14 11:34 Isn't this in favour of Ada?? Erlo Haugen
2005-07-14 14:56 ` Mike Silva
2005-07-14 16:11   ` Jeffrey Carter
2005-07-14 18:06     ` Marc A. Criley
2005-07-15 13:05       ` Marin David Condic
2005-07-19 17:03         ` James Alan Farrell
2005-07-19 17:31           ` Ed Falis
2005-07-20 11:49           ` Marin David Condic
2005-07-19 11:40     ` Erlo Haugen
2005-07-19 17:10       ` Jeffrey Carter
2005-07-19 15:41     ` Dan McLeran
2005-07-19 17:17       ` Adrien Plisson
2005-07-20  2:22       ` Jeffrey Carter
2005-07-20  5:13         ` Dan McLeran
2005-07-22  7:30     ` Erlo Haugen
2005-07-22 13:12       ` Marc A. Criley
2005-07-22 13:36         ` Erlo Haugen
2005-07-22 14:24           ` Dan McLeran
2005-07-22 14:29           ` Bob Spooner
2005-07-23 13:02             ` Ludovic Brenta
2005-07-22 18:01           ` Marc A. Criley
2005-07-22 15:49       ` Jeffrey Carter
2005-07-15 14:04 ` Florian Weimer
2005-07-15 21:10   ` Larry Kilgallen
2005-07-18 12:37     ` Marin David Condic
2005-07-18 12:57       ` Ed Falis
2005-07-18 13:18         ` Marin David Condic [this message]
2005-07-18 14:12           ` Ed Falis
2005-07-19 12:51             ` Marin David Condic
2005-07-19 18:08               ` Robert A Duff
2005-07-20  5:12                 ` Simon Wright
2005-07-20 15:37                   ` Robert A Duff
2005-07-21 12:15                     ` Marin David Condic
2005-07-21 15:32                       ` Robert A Duff
2005-07-20 12:26                 ` Marin David Condic
2005-10-27  7:20                   ` Robert I. Eachus
2005-08-04 12:59     ` Florian Weimer
2005-08-05 14:29       ` Larry Kilgallen
2005-08-05 16:58         ` Florian Weimer
2005-08-05 23:15           ` Larry Kilgallen
2005-08-06  4:01           ` tmoran
2005-08-06 10:28           ` Pascal Obry
2005-08-06 10:33             ` Pascal Obry
2005-08-06 11:02           ` Dmitry A. Kazakov
2005-07-21 13:27 ` Maciej Sobczak
2005-07-22  7:39   ` Erlo Haugen
2005-07-22  9:29     ` Maciej Sobczak
2005-07-22 10:41       ` Erlo Haugen
2005-07-22 14:28         ` Alex R. Mosteo
2005-07-22 15:02           ` Pascal Obry
2005-07-25  9:48             ` Tassilo v. Parseval
2005-07-25 13:31               ` Adrien Plisson
2005-07-25 15:08                 ` Jerome Hugues
2005-07-25 15:58                   ` Adrien Plisson
2005-07-25 21:03                     ` Jerome Hugues
2005-07-26  6:03                       ` Tassilo v. Parseval
2005-07-25 16:39               ` Pascal Obry
2005-07-26  5:58                 ` Tassilo v. Parseval
2005-07-26 17:25                   ` Pascal Obry
2005-07-22 15:26           ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox