SHARE
TWEET

Untitled

a guest Jul 12th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program intento3;
  2. var s1:boolean;
  3.     s2:boolean;
  4.    
  5. process p1;
  6. begin
  7.     repeat
  8.     while s2=true do;
  9.         s1:=true;
  10.        
  11.         writeln('ingresando a la seccion critica p1');
  12.        
  13.         s1:=false;
  14.     forever
  15. end;
  16.  
  17. process p2;
  18. begin
  19.     repeat
  20.     while s1=true do;
  21.         s2:=true;
  22.    
  23.         writeln('ingresando a la seccion critica p2');
  24.        
  25.         s2:=false;
  26.     forever
  27. end;
  28.  
  29. begin
  30.     s1:=false;
  31.     s2:=false;
  32.    
  33.     cobegin
  34.     p1;
  35.     p2;
  36.     coend
  37. end.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top