pragma Ada_2005; with Ada.Containers.Doubly_Linked_Lists; package Polling is ProcNotFound:exception; type ProcAccess is not null access procedure; type Set is tagged limited private; procedure Add(This: in out Set; Proc: ProcAccess); procedure Remove(This: in out Set; Proc: ProcAccess); procedure Run(This: in out Set); procedure Test; private type ProcListEntry is record Proc : ProcAccess; Count : Natural :=0; end record; package ProcList is new Ada.Containers.Doubly_Linked_Lists (Element_Type => ProcListEntry); type Set is tagged limited record Procs : ProcList.List; end record; end Polling;