Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* PRIMER INTENTO */
- while(turno !=0);
- /* SC*/
- turno = 1;
- /* ¿Y porqué no lo siguiente? */
- while(estado !=0);
- estado = 1;
- /* SC*/
- estado = 0;
- /* SEGUNDO INTENTO */
- while(estado[1]);
- estado[0] = TRUE;
- /*SC*/
- estado[0] = FALSE;
- /* TERCER INTENTO */
- estado[0] = TRUE;
- while(estado[1]);
- /* SC * /
- estado[0] = FALSE;
- /* CUARTO INTENTO */
- estado[0] = TRUE;
- while(estado[1]) {
- estado[0] = FALSE;
- /* espera */ usleep(1);
- estado[0] = TRUE;
- }
- /* SC */
- estado[0]= FALSE;
- /*ALGORITMO DE DEKKER (1968) */
- int estado[2]
- int turno;
- while (estado[1]) {
- if(turno == 1) {
- estado[0] = 0;
- while(turno == 1);
- estado[0] = 1;
- }
- }
- /* SC */
- turno = 1;
- estado[0] = 0;
- /* ALGORITMO DE PETERSON (1981) */
- int estado[2]
- int turno;
- estado[0] = 1;
- turno = 1;
- while (estado[1] && turno == 1);
- /* SC */
- estado[0] = 0;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement