comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Precondition on protected entry
Date: Tue, 11 Oct 2016 18:02:31 +0100
Date: 2016-10-11T18:02:31+01:00	[thread overview]
Message-ID: <lywphezumw.fsf@pushface.org> (raw)

I have this (Ravenscar, STM32F4) code:

   protected Timer_Handler
   with Interrupt_Priority => System.Interrupt_Priority'Last - 1
   is
      entry Wait
      with Pre => Running;
      procedure Start_Waiting (For_Interval : Duration)
      with Pre => For_Interval <= 0.010_000 and not Running;
      function Running return Boolean;
   private
      procedure Handler
      with
        Attach_Handler => Ada.Interrupts.Names.TIM8_TRG_COM_TIM14_Interrupt;
      Triggered : Boolean := False;
      Is_Running : Boolean := False;
   end Timer_Handler;

and GNAT GPL 2016 says

    19.    protected Timer_Handler
    20.    with Interrupt_Priority => System.Interrupt_Priority'Last - 1
    21.    is
    22.       entry Wait
    23.       with Pre => Running;
                          |
        >>> "Running" is undefined

Is this a compiler bug, or is there something in e.g. ARM 6.1.1 that
I've missed?

             reply	other threads:[~2016-10-11 17:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-11 17:02 Simon Wright [this message]
2016-10-11 23:37 ` Precondition on protected entry Dennis Lee Bieber
2016-10-12  7:19   ` Simon Wright
2016-10-12 16:07 ` Stephen Leake
2016-10-12 18:58   ` Simon Wright
2017-01-20 16:54     ` Simon Wright
2017-01-21 17:51       ` Simon Wright
replies disabled

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