home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / misc / ada1110b.lha / Examples / Dine / chopbody.ada next >
Encoding:
Text File  |  1992-03-02  |  378 b   |  22 lines

  1. PACKAGE BODY Chop IS
  2. -- Package body for chopstick task, intended for use with
  3. -- dining philosophers. It is really just a simple binary semaphore.
  4. -- Michael B. Feldman, November 1990
  5.  
  6.   TASK BODY Stick IS
  7.  
  8.   BEGIN
  9.     
  10.     LOOP
  11.       SELECT
  12.         ACCEPT Pick_Up;
  13.         ACCEPT Put_Down;
  14.       OR
  15.         TERMINATE;
  16.       END SELECT;
  17.     END LOOP;
  18.  
  19.   END Stick;
  20.  
  21. END Chop;
  22.