From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: How to emulate multiple exports
Date: Mon, 20 Apr 2020 08:52:53 +0200
Date: 2020-04-20T08:52:53+02:00 [thread overview]
Message-ID: <r7jgs5$v20$1@dont-email.me> (raw)
In-Reply-To: <a5f5e373-e84c-4b6c-9ea4-da7fb089a565@googlegroups.com>
On 4/20/20 1:53 AM, Jere wrote:
> I am working in a space constrained environment (256k flash)
> and I want to try and reuse the same exported function for
> all of my unused interrupt handlers.
>
> procedure Default;
> procedure Default is
> begin
> -- Do some complex stuff;
> end Default;
Interrupt handling in Ada is defined in ARM C.3
(http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-C-3.html). The standard
way to use a single handler for multiple interrupts is to create the handler as
a library-level parameterless protected procedure with aspect Interrupt_Handler
set to True. At elaboration, calls to Ada.Interrupts.Attach_Handler attach this
handler to multiple Interrupt_Ids. No Export is needed.
GNAT is supposed to support Annex C for all targets, so I would expect this to
work with your setup. Perhaps there is something about your target that prevents
this approach, but this would be my initial approach to the problem.
--
Jeff Carter
"He that hath no beard is less than a man."
Much Ado About Nothing
132
next prev parent reply other threads:[~2020-04-20 6:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-19 23:53 How to emulate multiple exports Jere
2020-04-20 6:27 ` Egil H H
2020-04-20 20:48 ` Jere
2020-04-20 6:52 ` Jeffrey R. Carter [this message]
2020-04-20 20:51 ` Jere
2020-04-20 9:57 ` Simon Wright
2020-04-20 20:57 ` Jere
2020-04-21 7:58 ` Simon Wright
2020-04-24 1:36 ` Jere
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox