version 1.117, 2019/02/12 14:38:43
|
version 1.119, 2019/10/31 15:40:22
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.31 |
RPL/2 (R) version 4.1.32 |
Copyright (C) 1989-2019 Dr. BERTRAND Joël |
Copyright (C) 1989-2019 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 2328 instruction_wflock(struct_processus *s_e
|
Line 2328 instruction_wflock(struct_processus *s_e
|
return; |
return; |
} |
} |
|
|
# 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; |
|
return; |
|
} |
|
|
|
# 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) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
|
if (lock.l_type == F_UNLCK) |
if (lock.l_type == F_UNLCK) |
{ |
{ |
drapeau = d_vrai; |
drapeau = d_vrai; |
Line 2386 instruction_wflock(struct_processus *s_e
|
Line 2363 instruction_wflock(struct_processus *s_e
|
registre_instruction_valide; |
registre_instruction_valide; |
} |
} |
|
|
nanosleep(&attente, NULL); |
|
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
|
|
|
# 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; |
|
return; |
|
} |
|
|
|
nanosleep(&attente, NULL); |
|
|
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
|
|
|
# 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) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
} |
} |
} while((drapeau == d_faux) && ((*s_etat_processus) |
} while((drapeau == d_faux) && ((*s_etat_processus) |
.var_volatile_requete_arret != -1)); |
.var_volatile_requete_arret != -1)); |
Line 3928 instruction_wfswi(struct_processus *s_et
|
Line 3929 instruction_wfswi(struct_processus *s_et
|
} |
} |
else |
else |
{ |
{ |
|
# 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; |
|
return; |
|
} |
nanosleep(&attente, NULL); |
nanosleep(&attente, NULL); |
|
|
|
# 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) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
} |
|
|
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
INCR_GRANULARITE(attente.tv_nsec); |
INCR_GRANULARITE(attente.tv_nsec); |
} |
} |