summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gnat.dg/sync1.adb
blob: 08be6395d68125738daa9b0cd6436110e6765a0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
--  { dg-do compile }
package body sync1 is
   protected body Chopstick is

     entry Pick_Up when not Busy is
     begin
        Busy := True;
     end Pick_Up;

     procedure Put_Down is
     begin
        Busy := False;
     end Put_Down;
   end Chopstick;
end sync1;