Cambiamos el lugar donde se modifica la variable de control:
P0 P1
non-critical section non-critical section
set v0 to true set v1 to true
wait until v1 equals false wait until v0 equals false
critical section using r critical section using r
set v0 to false set v1 to false