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 / room.ads < prev    next >
Text File  |  2000-07-19  |  819b  |  32 lines

  1. --::::::::::
  2. --room.ads
  3. --::::::::::
  4. with Chop;
  5. with Phil;
  6. with Society;
  7. package Room is
  8.  
  9.   -- Dining Philosophers - Ada 95 edition
  10.  
  11.   -- Room.Maitre_D is responsible for assigning seats at the
  12.   --   table, "left" and "right" chopsticks, and for reporting
  13.   --   interesting events to the outside world.
  14.  
  15.   -- Michael B. Feldman, The George Washington University,
  16.   -- July, 1995.
  17.  
  18.   Table_Size : constant := 5;
  19.   subtype Table_Type is Positive range 1 .. Table_Size;
  20.  
  21.   Sticks : array (Table_Type) of Chop.Stick;
  22.  
  23.   task Maitre_D is
  24.     entry Start_Serving;
  25.     entry Report_State (Which_Phil : in Society.Unique_DNA_Codes;
  26.                         State      : in Phil.States;
  27.                         How_Long   : in Natural := 0;
  28.                         Which_Meal : in Natural := 0);
  29.   end Maitre_D;
  30.  
  31. end Room;
  32.