SLIDE 11 Vienna, June-2002 Ada-Europe 2002 11
Ada constructs: model of a synchronization artifact.
protected is pragma pragma procedure entry private end Synchro Locking_Pol icy(Ceiling_Locking); Priority(28); Fi re; Await; Event: B
Synchro; protected body is procedure is begin end entry when is begin end end Synchro Fire Event:=True; Fire; Await Event Event:=False; Await; Synchro;
- - Ada task that generates the event
.. Synchro.Fire; ..
ts for theevent .. Synchro.Await; ..
<<Protected>> M_Synchro_1
Event: Named_State Access_Policy=Immediate_Ceiling(28) <<Composite>> Fire() <<Simple>> Fire_Oper(wcet=1.5E-6) <<Simple>> Await.Exec(wcet=1.2E-6) <<Simple>> Await.GE(wcet=0.8E-6) <<Guarded> Await
Fire procedure model Await entry model
do/ Await.GE do/ Await.Exec do/Lock do/Unlock
<<Wait_State>>
Event do/ Await.Exec do/ Await.GE do/Fire_Oper Event
<<Named_State>>
do/Lock do/Lock do/Unlock do/Unlock