Advertisement
Guest User

Untitled

a guest
Apr 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. #define TRUE 1
  2. #define FALSE 0
  3. #define N 2
  4. Int interested[2];
  5. void enter_region(int process);
  6. {
  7. Int other /* numero dell’altro processo */
  8. Other = 1 – process
  9. Interested[process] = TURE;
  10. while(interested[other] == TRUE);
  11. }
  12. CRITICAL REGION
  13. Void leave_region (int process);
  14. {
  15. Interested[process] = FALSE;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement