DEVELOPMENT EDITION · 769442725406
Library Reference
Package Ada.Synchronous_Task_Control
Verada predefined library: Ada.Synchronous_Task_Control (Ada RM D.10), suspension objects: a task waits in Suspend_Until_True until another sets the object true. An object of the type is synchronised state, shared by tasks without a race (B3019 does not apply), and, as Ravenscar and Jorvik require, at most one task ever waits on it, which Verada checks (B3029 otherwise). Suspend_Until_True may wait, so a protected action does not call it.
Suspension_Object
type Suspension_Object is limited private;Set_True
procedure Set_True (S : in out Suspension_Object)
with Global => null;wakes the task waiting on S, if any; else the next Suspend_Until_True returns at once
Set_False
procedure Set_False (S : in out Suspension_Object)
with Global => null;Current_State
function Current_State (S : Suspension_Object) return Boolean
with Volatile_Function, Global => null;S's state now (another task may change it at once)
Suspend_Until_True
procedure Suspend_Until_True (S : in out Suspension_Object)
with Global => null;waits until S is true, then makes it false