protected type interrupts
- From: "REH" <spamjunk@xxxxxxxxxxx>
- Date: 24 Aug 2006 07:47:19 -0700
I am having a disagreement with a compiler vendor. I am using a
protected type for an interrupt handler (see below). The handler
simply sets a boolean to true that an entry is using as a guard. The
entry is called by a task. Basically, the task is blocked until
signaled by the interrupt to do the processing. With newer versions of
their compiler, the computer resets. They say it is because they are
calling the entry at the interrupt level, and not the task level (we
process this in a task because we have to do things you cannot do in a
interrupt). They say the LRM allows them to do this. Is that true? I
call the entry from a task, but its allow to be executed in the
interrupt handler. That does not seem right.
protected Interrupt_Object is
procedure Isr;
pragma Attach_Handler(Isr, XXX);
pragma Interrupt_Priority(XXX);
entry Process_Interrupt;
private
pragma Suppress(All_Checks, On => Isr);
Triggered : Boolean := False;
end Interrupt_Object;
protected body Interrupt_Object is
procedure Isr is
begin
Triggered := True;
end Isr;
entry Process_Interrupt when Triggered is
begin
Triggered := False;
-- process interrrupt
end Process_Interrupt;
end Interrupt_Object;
task body Interrupt_Task is
begin
loop
Interrupt_Object.Process_Interrupt;
end loop;
end Interrupt_Task;
.
- Follow-Ups:
- Re: protected type interrupts
- From: Jeffrey R. Carter
- Re: protected type interrupts
- From: Simon Wright
- Re: protected type interrupts
- From: Jean-Pierre Rosen
- Re: protected type interrupts
- Prev by Date: Re: Usage of \ in Ada
- Next by Date: Re: Information On How To Use The Ada Score Compiler For Windows PC
- Previous by thread: Ripple effect
- Next by thread: Re: protected type interrupts
- Index(es):
Relevant Pages
|