From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d1b37af34f7d1666 X-Google-Attributes: gid103376,public From: "Pat Rogers" Subject: Re: Connecting To Interrupts Using Protected Procedures Date: 1999/02/17 Message-ID: <7aftch$bn8$1@remarQ.com>#1/1 X-Deja-AN: 445548178 References: <36CB42FA.FDD195CF@pwfl.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 X-Complaints-To: newsabuse@remarQ.com X-Trace: 919304401 Y6JRGRJUHDE65C640C usenet55.supernews.com Organization: Software Arts & Sciences Newsgroups: comp.lang.ada Date: 1999-02-17T00:00:00+00:00 List-Id: Marin David Condic wrote in message <36CB42FA.FDD195CF@pwfl.com>... >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