From: Stephen Leake <stephen_leake@stephe-leake.org>
Subject: Re: Precondition on protected entry
Date: Wed, 12 Oct 2016 09:07:54 -0700 (PDT)
Date: 2016-10-12T09:07:54-07:00 [thread overview]
Message-ID: <e6e60daa-0a6e-450c-a06a-7c2b7cb468d7@googlegroups.com> (raw)
In-Reply-To: <lywphezumw.fsf@pushface.org>
On Tuesday, October 11, 2016 at 3:29:47 PM UTC-5, Simon Wright wrote:
> I have this (Ravenscar, STM32F4) code:
>
I modified it slightly to compile with Windows GNAT GPL 2016:
with Ada.Interrupts.Names;
with System;
package Timer_Handler is
protected Timer_Handler
with Interrupt_Priority => System.Interrupt_Priority'Last
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.SIGFPE;
Triggered : Boolean := False;
Is_Running : Boolean := False;
end Timer_Handler;
end Timer_Handler;
package body Timer_Handler is
protected body Timer_Handler is
entry Wait
when Standard.True
is
begin
null;
end Wait;
procedure Start_Waiting
(For_Interval : Duration)
is
begin
null;
end Start_Waiting;
function Running return Boolean is
begin
return Is_Running;
end Running;
procedure Handler
is
begin
null;
end Handler;
end Timer_Handler;
end Timer_Handler;
gnatmake timer_handler.adb
no errors.
So this looks like a problem with the cross target only?
next prev parent reply other threads:[~2016-10-12 16:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-11 17:02 Precondition on protected entry Simon Wright
2016-10-11 23:37 ` Dennis Lee Bieber
2016-10-12 7:19 ` Simon Wright
2016-10-12 16:07 ` Stephen Leake [this message]
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