Advertisement
Guest User

Untitled

a guest
May 20th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ada 0.42 KB | None | 0 0
  1. package Semafor_Bin is
  2. protected type Semafor_Bin (N: Natural) is
  3. entry PB;
  4. procedure VB;
  5. private
  6. count: natural :=N
  7. end Semafor_Bin;
  8. type Semafor_Bin_Acc is access all Semafor_Bin;
  9. end Semafor_Bin;
  10. package body Semafor_Bin is
  11. protected body Semafor_Bin is
  12. entry PB when count>0 is
  13. begin count:=count-1;
  14. end PB;
  15. procedure VB is
  16. begin count:=count+1;
  17. end VB
  18. end Semafor_Bin
  19. begin
  20. null;
  21. end Semafor_Bin;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement