comp.lang.ada
 help / color / mirror / Atom feed
* Ravenscar vs selective wait
@ 2015-03-23 22:00 Simon Wright
  2015-03-24  6:48 ` Simon Wright
  0 siblings, 1 reply; 6+ messages in thread
From: Simon Wright @ 2015-03-23 22:00 UTC (permalink / 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.

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

end of thread, other threads:[~2015-03-24 20:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-23 22:00 Ravenscar vs selective wait Simon Wright
2015-03-24  6:48 ` 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

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