version 1.101, 2019/02/11 09:45:52
|
version 1.102, 2019/02/12 14:38:43
|
Line 3406 instruction_syseval(struct_processus *s_
|
Line 3406 instruction_syseval(struct_processus *s_
|
struct sigaction action_courante; |
struct sigaction action_courante; |
struct sigaction action_passee; |
struct sigaction action_passee; |
|
|
|
struct timespec attente; |
|
|
unsigned char *ligne; |
unsigned char *ligne; |
unsigned char *ptr; |
unsigned char *ptr; |
unsigned char *ptr2; |
unsigned char *ptr2; |
Line 3671 instruction_syseval(struct_processus *s_
|
Line 3673 instruction_syseval(struct_processus *s_
|
|
|
fflush(NULL); |
fflush(NULL); |
|
|
verrouillage_threads_concurrents(s_etat_processus); |
attente.tv_sec = 0; |
|
attente.tv_nsec = GRANULARITE_us * 1000; |
action_courante.sa_handler = SIG_IGN; |
|
action_courante.sa_flags = 0; |
|
|
|
if (pthread_mutex_lock(&mutex_sigaction) != 0) |
while(pthread_mutex_trylock(&mutex_sigaction) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
# ifndef SEMAPHORES_NOMMES |
return; |
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); |
|
|
|
# ifndef SEMAPHORES_NOMMES |
|
while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) |
|
# else |
|
while(sem_wait((*s_etat_processus).semaphore_fork) != 0) |
|
# endif |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
} |
} |
|
|
|
action_courante.sa_handler = SIG_IGN; |
|
action_courante.sa_flags = 0; |
|
|
if (sigaction(SIGINT, &action_courante, &action_passee) != 0) |
if (sigaction(SIGINT, &action_courante, &action_passee) != 0) |
{ |
{ |
for(i = 0; i < nombre_arguments; i++) |
for(i = 0; i < nombre_arguments; i++) |
Line 3696 instruction_syseval(struct_processus *s_
|
Line 3719 instruction_syseval(struct_processus *s_
|
return; |
return; |
} |
} |
|
|
|
verrouillage_threads_concurrents(s_etat_processus); |
|
|
pid = fork(); |
pid = fork(); |
|
|
if (pid < 0) |
if (pid < 0) |