comp.lang.ada
 help / color / mirror / Atom feed
* protected type interrupts
@ 2006-08-24 14:47 REH
  2006-08-24 15:39 ` Jean-Pierre Rosen
                   ` (2 more replies)
  0 siblings, 3 replies; 21+ messages in thread
From: REH @ 2006-08-24 14:47 UTC (permalink / raw)


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;




^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2006-08-26 13:16 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-08-24 14:47 protected type interrupts REH
2006-08-24 15:39 ` Jean-Pierre Rosen
2006-08-24 16:23   ` REH
2006-08-24 18:15     ` Adam Beneschan
2006-08-24 19:16       ` REH
2006-08-24 21:16         ` Adam Beneschan
2006-08-24 21:39           ` REH
2006-08-25  6:45           ` Jean-Pierre Rosen
2006-08-24 23:55         ` Jeffrey R. Carter
2006-08-25  6:42         ` Jean-Pierre Rosen
2006-08-24 23:47     ` Jeffrey R. Carter
2006-08-25  6:38     ` Jean-Pierre Rosen
2006-08-24 20:11 ` Simon Wright
2006-08-24 23:50 ` Jeffrey R. Carter
2006-08-25  6:48   ` Jean-Pierre Rosen
2006-08-25 11:33     ` REH
2006-08-25 17:27       ` Jean-Pierre Rosen
2006-08-25 20:57     ` Jeffrey R. Carter
2006-08-25 23:17       ` REH
2006-08-26  6:38         ` Jeffrey R. Carter
2006-08-26 13:16           ` REH

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