home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / adav313.zip / gnat-3_13p-os2-bin-20010916.zip / emx / gnat / examples / chop.adb next >
Text File  |  2000-07-19  |  446b  |  27 lines

  1. ------
  2. --::::::::::
  3. --chop.adb
  4. --::::::::::
  5. package body Chop is
  6.  
  7.   -- Dining Philosophers - Ada 95 edition
  8.   -- Chopstick is an Ada 95 protected type
  9.   -- Michael B. Feldman, The George Washington University,
  10.   -- July, 1995.
  11.  
  12.   protected body Stick is
  13.  
  14.     entry PIck_Up when not In_Use is
  15.     begin
  16.       In_Use := True;
  17.     end PIck_Up;
  18.  
  19.     procedure Put_Down is
  20.     begin
  21.       In_Use := False;
  22.     end Put_Down;
  23.  
  24.   end Stick;
  25.  
  26. end Chop;
  27.