Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define TRUE 1
- #define FALSE 0
- #define N 2
- Int interested[2];
- void enter_region(int process);
- {
- Int other /* numero dell’altro processo */
- Other = 1 – process
- Interested[process] = TURE;
- while(interested[other] == TRUE);
- }
- CRITICAL REGION
- Void leave_region (int process);
- {
- Interested[process] = FALSE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement