Prev Next

Haskell implementation

 Item get() {
   atomic (n_items > 0) {...remove item...}
 }
 get (); get ();
 atomic (???) { get (); get (); }
 atomic { if (n>k) then launch_missiles(); S2 }
23