comp.lang.ada
 help / color / mirror / Atom feed
From: Simon Wright <simon@pushface.org>
Subject: Ravenscar vs selective wait
Date: Mon, 23 Mar 2015 22:00:25 +0000
Date: 2015-03-23T22:00:25+00:00	[thread overview]
Message-ID: <lyoanjv0g6.fsf@pushface.org> (raw)

Is it possible to construct an analog of the selective wait using the
Ravenscar profile?

   Turn_On_The_Lamp;
   Next := Clock + Milliseconds (500);
   select
      accept Reset do
         Next := Clock + Milliseconds (500);
      end Reset;
   or
      delay until Next;
      Turn_Off_The_Lamp;
   end select;

where the Lamp goes off 500 ms after it was turned on, but you can reset
the timer by calling the Reset entry.

Of course, Ravenscar prohibits both task entries and select statements,
so I'm looking for something else! Preferably not involving polling.

             reply	other threads:[~2015-03-23 22:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-23 22:00 Simon Wright [this message]
2015-03-24  6:48 ` Ravenscar vs selective wait Simon Wright
2015-03-24  7:25   ` Jeffrey Carter
2015-03-24  9:21     ` J-P. Rosen
2015-03-24 17:16       ` Jeffrey Carter
2015-03-24 20:12       ` 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