comp.lang.ada
 help / color / mirror / Atom feed
From: "Pat Rogers" <progers@NOclasswideSPAM.com>
Subject: Re: Connecting To Interrupts Using Protected Procedures
Date: 1999/02/17
Date: 1999-02-17T00:00:00+00:00	[thread overview]
Message-ID: <7aftch$bn8$1@remarQ.com> (raw)
In-Reply-To: 36CB42FA.FDD195CF@pwfl.com

Marin David Condic wrote in message <36CB42FA.FDD195CF@pwfl.com>...

<snip>

>Now Ada95 allows this as per ARM J.7.1 etc. but given that it is
>considered obsolete, I'd like to do it by the preferred method. So
I've
>looked at connecting the 1ms interrupt to a protected procedure and
this
>all looks pretty straightforward. The problem is getting this
protected
>procedure to periodically kick off the slower cycle task. According
to
>ARM 9.5.1(8..17) you can't call an entry from there without creating
a
>bounded error. (Maybe it will run, but only if the system can't
detect
>it and raise Program_Error.) So how is it that the protected
procedure
>should communicate to the slower task to start cycling? You want the
>slower task to be blocked until its time cycle comes around again, so
>you would naturally think of some form of entry - but so far as I can
>see, I've got no way of legally doing that. I suppose one could poll
a
>shared variable until the interrupt handler set the flag, but polling
>answers are just not practical in this arena. (Ideally, you would
want
>to implement this with a clock and a delay statement, but the
hardware
>doesn't support this at the moment.)



It sounds like you should have the slower task call and suspend on an
entry in the interrupt handler protected object, and have the
interrupt handler procedure set a flag (inside that same PO) that
allows that entry call to proceed whenever appropriate (ie on the Nth
cycle).  The flag is false until the interrupt handler (procedure)
determines that it is appropriate for the task to return from the
call.

That's the way I interpret what you're saying anyway -- I may have
misunderstood what you want to happen!

HTH,


---
Pat Rogers                          Training & Development in:
http://www.classwide.com    Deadline Schedulability Analysis
progers@classwide.com         Software Fault Tolerance
(281)648-3165                       Real-Time/OO Languages






  reply	other threads:[~1999-02-17  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-17  0:00 Connecting To Interrupts Using Protected Procedures Marin David Condic
1999-02-17  0:00 ` Pat Rogers [this message]
1999-02-18  0:00   ` Pat Rogers
1999-02-18  0:00     ` Marin David Condic
1999-02-18  0:00 ` Matthew Heaney
1999-02-18  0:00 ` robert_dewar
1999-02-18  0:00   ` Marin David Condic
1999-02-18  0:00     ` robert_dewar
replies disabled

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