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 / phil.ads < prev    next >
Text File  |  2000-07-19  |  564b  |  23 lines

  1. --::::::::::
  2. --phil.ads
  3. --::::::::::
  4. with Society;
  5. package Phil is
  6.  
  7.   -- Dining Philosophers - Ada 95 edition
  8.   -- Philosopher is an Ada 95 task type with discriminant
  9.   -- Michael B. Feldman, The George Washington University,
  10.   -- July, 1995.
  11.  
  12.   task type Philosopher (My_ID : Society.Unique_DNA_Codes) is
  13.  
  14.     entry Start_Eating (Chopstick1 : in Positive;
  15.                         Chopstick2 : in Positive);
  16.  
  17.   end Philosopher;
  18.  
  19.   type States is (Breathing, Thinking, Eating, Done_Eating, 
  20.                   Got_One_Stick, Got_Other_Stick, Dying);
  21.  
  22. end Phil;
  23.