From: Jere <jhb.chat@gmail.com>
Subject: Re: How to emulate multiple exports
Date: Mon, 20 Apr 2020 13:51:41 -0700 (PDT)
Date: 2020-04-20T13:51:41-07:00 [thread overview]
Message-ID: <db5a151e-7bc2-40dc-ada9-36cfa9120963@googlegroups.com> (raw)
In-Reply-To: <r7jgs5$v20$1@dont-email.me>
On Monday, April 20, 2020 at 2:52:55 AM UTC-4, Jeffrey R. Carter wrote:
> 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
Unfortunately, the runtime I am using doesn't support
protected types and the Ada standard doesn't really
provide any support for interrupts in that arena that
I can tell. A lot of this has to be done
on a platform by platform basis, but I was hoping
that there was a way to at least leverage Export
as that was language defined.
next prev parent reply other threads:[~2020-04-20 20:51 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
2020-04-20 20:51 ` Jere [this message]
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