DEVELOPMENT EDITION · 769442725406
Library Reference
On this page

Package Verada.Tasking

Verada predefined library: the run-time's tasking operations (Ada's Jorvik profile), which tasks, protected objects and delay statements are made of before analysis. Programs call Stop only; the rest is what Verada writes for them.

Task_Body

type Task_Body is access procedure;

a task's body, started by the elaboration of the package body that holds it, and run once library elaboration is over

Start

procedure Start (Body_Of : Task_Body)
  with Import, Convention => Ada, External_Name => "verada_rt_task_start", Global => null;

Stop

procedure Stop
  with Import, Convention => Ada, External_Name => "verada_rt_tasks_stop", Global => null;

every task ends, the calling one too: the program ends once its main subprogram returns (a task ends at its next delay, wait or loop iteration outside a protected action)

Lock_Id

type Lock_Id is new Integer;

a protected object's lock, held by each of its actions

New_Lock

function New_Lock return Lock_Id
  with Import, Convention => Ada, External_Name => "verada_rt_lock_new", Global => null;

Lock

procedure Lock (L : Lock_Id)
  with Import, Convention => Ada, External_Name => "verada_rt_lock", Global => null;

Unlock

procedure Unlock (L : Lock_Id)
  with Import, Convention => Ada, External_Name => "verada_rt_unlock", Global => null;

Wait

procedure Wait (L : Lock_Id)
  with Import, Convention => Ada, External_Name => "verada_rt_lock_wait", Global => null;

an entry whose barrier is closed waits until another action changes the object

Notify

procedure Notify (L : Lock_Id)
  with Import, Convention => Ada, External_Name => "verada_rt_lock_notify", Global => null;

after an action that may open a barrier

Delay_Until

procedure Delay_Until (T : Ada.Real_Time.Time)
  with Global => null;

Delay_For

procedure Delay_For (D : Duration)
  with Global => null;

for at least D (to the nanosecond above it), however long

Attach

function Attach (Interrupt : Integer; Handler : Task_Body) return Boolean
  with Import, Convention => Ada, External_Name => "verada_rt_attach_handler", Global => null;

an interrupt's handler, a protected procedure, attached as its package is elaborated (Attach_Handler); True