version 1.50, 2011/09/20 09:51:43
|
version 1.51, 2011/09/20 14:36:29
|
Line 261 instruction_wait(struct_processus *s_eta
|
Line 261 instruction_wait(struct_processus *s_eta
|
|
|
do |
do |
{ |
{ |
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 270 instruction_wait(struct_processus *s_eta
|
Line 274 instruction_wait(struct_processus *s_eta
|
code_retour = nanosleep(&temporisation, &temporisation); |
code_retour = nanosleep(&temporisation, &temporisation); |
erreur = errno; |
erreur = errno; |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1447 instruction_write(struct_processus *s_et
|
Line 1455 instruction_write(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (sigaction(SIGPIPE, ®istre, NULL) != 0) |
if (sigaction(SIGPIPE, ®istre, NULL) != 0) |
{ |
{ |
Line 1470 instruction_write(struct_processus *s_et
|
Line 1482 instruction_write(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1490 instruction_write(struct_processus *s_et
|
Line 1506 instruction_write(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1543 instruction_write(struct_processus *s_et
|
Line 1563 instruction_write(struct_processus *s_et
|
adresse_unix.sun_path[UNIX_PATH_MAX - 1] = |
adresse_unix.sun_path[UNIX_PATH_MAX - 1] = |
d_code_fin_chaine; |
d_code_fin_chaine; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 1556 instruction_write(struct_processus *s_et
|
Line 1580 instruction_write(struct_processus *s_et
|
{ |
{ |
ios = errno; |
ios = errno; |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1577 instruction_write(struct_processus *s_et
|
Line 1606 instruction_write(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1604 instruction_write(struct_processus *s_et
|
Line 1637 instruction_write(struct_processus *s_et
|
adresse_ipv4.sin_port = htons(port); |
adresse_ipv4.sin_port = htons(port); |
adresse_ipv4.sin_addr.s_addr = htonl(calcul_adresse); |
adresse_ipv4.sin_addr.s_addr = htonl(calcul_adresse); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 1615 instruction_write(struct_processus *s_et
|
Line 1653 instruction_write(struct_processus *s_et
|
longueur_effective, 0, (struct sockaddr *) |
longueur_effective, 0, (struct sockaddr *) |
&adresse_ipv4, sizeof(adresse_ipv4)) < 0) |
&adresse_ipv4, sizeof(adresse_ipv4)) < 0) |
{ |
{ |
while(sem_wait(&((*s_etat_processus) |
# ifndef SEMAPHORES_NOMMES |
.semaphore_fork)) != 0) |
while(sem_wait(&((*s_etat_processus) |
|
.semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus) |
|
.semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1631 instruction_write(struct_processus *s_et
|
Line 1674 instruction_write(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1672 instruction_write(struct_processus *s_et
|
Line 1720 instruction_write(struct_processus *s_et
|
adresse_ipv6.sin6_addr.s6_addr[i] = |
adresse_ipv6.sin6_addr.s6_addr[i] = |
adresse[i], i++); |
adresse[i], i++); |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 1683 instruction_write(struct_processus *s_et
|
Line 1736 instruction_write(struct_processus *s_et
|
longueur_effective, 0, (struct sockaddr *) |
longueur_effective, 0, (struct sockaddr *) |
&adresse_ipv6, sizeof(adresse_ipv6)) < 0) |
&adresse_ipv6, sizeof(adresse_ipv6)) < 0) |
{ |
{ |
while(sem_wait(&((*s_etat_processus) |
# ifndef SEMAPHORES_NOMMES |
.semaphore_fork)) != 0) |
while(sem_wait(&((*s_etat_processus) |
|
.semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus) |
|
.semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1699 instruction_write(struct_processus *s_et
|
Line 1757 instruction_write(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 1903 instruction_wflock(struct_processus *s_e
|
Line 1966 instruction_wflock(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
} |
} |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2218 instruction_wfproc(struct_processus *s_e
|
Line 2289 instruction_wfproc(struct_processus *s_e
|
registre_instruction_valide; |
registre_instruction_valide; |
} |
} |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 2226 instruction_wfproc(struct_processus *s_e
|
Line 2302 instruction_wfproc(struct_processus *s_e
|
|
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2477 instruction_wfdata(struct_processus *s_e
|
Line 2558 instruction_wfdata(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 2485 instruction_wfdata(struct_processus *s_e
|
Line 2571 instruction_wfdata(struct_processus *s_e
|
|
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2671 instruction_wfsock(struct_processus *s_e
|
Line 2762 instruction_wfsock(struct_processus *s_e
|
{ |
{ |
drapeau = d_vrai; |
drapeau = d_vrai; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 2684 instruction_wfsock(struct_processus *s_e
|
Line 2779 instruction_wfsock(struct_processus *s_e
|
{ |
{ |
erreur = errno; |
erreur = errno; |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2716 instruction_wfsock(struct_processus *s_e
|
Line 2816 instruction_wfsock(struct_processus *s_e
|
} |
} |
else |
else |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2754 instruction_wfsock(struct_processus *s_e
|
Line 2859 instruction_wfsock(struct_processus *s_e
|
{ |
{ |
drapeau = d_vrai; |
drapeau = d_vrai; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 2767 instruction_wfsock(struct_processus *s_e
|
Line 2876 instruction_wfsock(struct_processus *s_e
|
{ |
{ |
erreur = errno; |
erreur = errno; |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2799 instruction_wfsock(struct_processus *s_e
|
Line 2913 instruction_wfsock(struct_processus *s_e
|
} |
} |
else |
else |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2856 instruction_wfsock(struct_processus *s_e
|
Line 2975 instruction_wfsock(struct_processus *s_e
|
{ |
{ |
drapeau = d_vrai; |
drapeau = d_vrai; |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 2868 instruction_wfsock(struct_processus *s_e
|
Line 2991 instruction_wfsock(struct_processus *s_e
|
{ |
{ |
erreur = errno; |
erreur = errno; |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 2900 instruction_wfsock(struct_processus *s_e
|
Line 3028 instruction_wfsock(struct_processus *s_e
|
} |
} |
else |
else |
{ |
{ |
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) |
|
!= 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 3186 instruction_wfpoke(struct_processus *s_e
|
Line 3319 instruction_wfpoke(struct_processus *s_e
|
|
|
do |
do |
{ |
{ |
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 3194 instruction_wfpoke(struct_processus *s_e
|
Line 3331 instruction_wfpoke(struct_processus *s_e
|
|
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |
Line 3336 instruction_wfack(struct_processus *s_et
|
Line 3477 instruction_wfack(struct_processus *s_et
|
return; |
return; |
} |
} |
|
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
if (sem_post((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
return; |
return; |
Line 3345 instruction_wfack(struct_processus *s_et
|
Line 3490 instruction_wfack(struct_processus *s_et
|
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
{ |
{ |
if (errno != EINTR) |
if (errno != EINTR) |
{ |
{ |