comp.lang.ada
 help / color / mirror / Atom feed
* Interrupts, Signals, and Events.
@ 2017-02-27 19:26 Diogenes
  2017-02-27 20:47 ` Dmitry A. Kazakov
  0 siblings, 1 reply; 2+ messages in thread
From: Diogenes @ 2017-02-27 19:26 UTC (permalink / raw)


Lately I've been toying with using Linux epoll() and BSD kqueue() with some test code.

I've come to the realization that the Interrupt_Handler facilities, relying solely on Signals, just isn't going to work for some of my upcoming projects.

So I've been wondering if an abstract package(similiar to Storage_Pools) like "Ada.Events" or "GNAT.Events" would be a welcome addition to the Ada ecosystem.

It would allow developers to define their own event mechanisms without being welded to the Signal mechanism that is the current default for many compilers and runtime environments.

Also, why do so many Ada developers default to the "exception" mechanism for most events when so many of the events are clearly NOT exceptions. A key press in a text editor, for example, should not be considered "exceptional". Right?

IMHO we should start breaking these interrupts down into their own "classes" if you will, according to their intended purpose...

Events - Interrupts that are EXPECTED to occur, probably quite frequently, as a normal part of program execution.

Signals - Interrupts that are not expected as a typical part of program execution, but also should NOT necessarily be considered "abnormal" or "erroneous".

Exceptions - Interrupts that are not a normal part of program execution and are most likely an indication that something went wrong.

This would also allow the compiler(I suspect) to do more accurate checking and optimization of each class of Interrupt.

Just a rough idea. Not sure if it makes sense. But it at least SOUNDS like a good idea.

Thank you for your patience. ;->

Diogenes

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-27 20:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 19:26 Interrupts, Signals, and Events Diogenes
2017-02-27 20:47 ` Dmitry A. Kazakov

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