I am also confused about the while loop part, if the condition in the while is not true, then how it is going to get into CS?
How does this Peterson's solution satisfy the conditions of Mutual exclusive, no-starvation and progress condition?
Thank you!