comp.lang.ada
 help / color / mirror / Atom feed
From: Diogenes <phathax0r@gmail.com>
Subject: Interrupts, Signals, and Events.
Date: Mon, 27 Feb 2017 11:26:48 -0800 (PST)
Date: 2017-02-27T11:26:48-08:00	[thread overview]
Message-ID: <c053291c-a2ca-4f7d-8eee-001e51096574@googlegroups.com> (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

             reply	other threads:[~2017-02-27 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 19:26 Diogenes [this message]
2017-02-27 20:47 ` Interrupts, Signals, and Events Dmitry A. Kazakov
replies disabled

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