Re: Isn't this in favour of Ada??



Marin David Condic <nobody@xxxxxxxxxxx> writes:

> Besides, this can only work if you have an operating system.

It *can* work without an operating system.

>... If you
> *are* the operating system, you'd have to do something to bump the
> hardware to make an interrupt happen

Right.

>... and this may or may not be possible
> in all cases.

It's possible for many interrupts on many systems, with or without an
OS. Many machines have a "trigger interrupt" instruction.

I wouldn't insist that the "trigger interrupt" Ada routine be completely
portable. After all, the names of the interrupts are inherently
nonportable. It's still useful to have a standard procedure, for those
systems where it can work. I'd define it to raise an exception for
interrupts that cannot be triggered.uun

>... This is why I say if Ada had something like a "signal"
> entity that is typically tied to an interrupt, but (since its an Ada
> thing) can be triggered by some Ada mechanism, then you've got the
> problem solved. You could probably "Roll Your Own" - but I'm not sure
> how to do that and still utilize Ada's normal mechanisms for interrupt
> processing.

I think such a signal mechanism would add some inefficiency.
Perhaps not much, but when you're using interrupts on a bare
machine, you want to be as close to the metal as possible,
and Ada's current design allows for that.

I suspect that rolling your own will give better results, because then
the programmer is in charge of the efficiency tradeoffs, and the
programmer can take advantage of the particular systems of interest,
whereas the language designer has to be portable to pretty much every
machine under the Sun.

- Bob
.



Relevant Pages

  • Re: Isnt this in favour of Ada??
    ... If you *are* the operating system, you'd have to do something to bump the hardware to make an interrupt happen and this may or may not be possible in all cases. ... This is why I say if Ada had something like a "signal" entity that is typically tied to an interrupt, but can be triggered by some Ada mechanism, then you've got the problem solved. ...
    (comp.lang.ada)
  • VMI Interface Proposal Documentation for I386, Part 2.2
    ... Interrupt and I/O Subsystem. ... the guest operating system is not given ... The paravirtualization environment provides a legacy programmable ...
    (Linux-Kernel)
  • Re: Is any function which can associate the irqno with interrupt handl
    ... and more interrupt ... function like enable irq and disable irq.... ... your operating system. ... For example the hardware I am using at the moment does not *have* ...
    (comp.lang.c)
  • Re: intel x86 instruction "cli"
    ... Linux is mostly sophisticated but the true answer is that it depends ... >> is interrogate the PIC to find out where the interrupt is coming from. ... >> operating system to handle additional interrupts that occur in the midst ... >> previous state of the processor interrupt mask was, ...
    (comp.os.linux.development.system)
  • Re: intel x86 instruction "cli"
    ... Linux belong to the simple one or sophisticated one? ... > interrogate the PIC to find out where the interrupt is coming from. ... This re-enabling allows the operating system to handle ... > processor interrupt mask will be left in a masked state for the ...
    (comp.os.linux.development.system)