Central Queensland Univeristy
MyInfocom
Faculty of Informatics and Communication
You are here: 85349 -> Resources -> Lectures -> 6 -> 10
Search | Site Map
[ Questions or Comments ]
int turn; //turn can have a value of either 0 or 1 //if turn = i, P(i) can enter it's critical section
do { while (turn != i) { /*do nothing*/ } critical section turn = j; remainder section } while (true)