version 1.84, 2016/03/22 17:12:14
|
version 1.106, 2025/04/15 10:17:51
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.25 |
RPL/2 (R) version 4.1.36 |
Copyright (C) 1989-2016 Dr. BERTRAND Joël |
Copyright (C) 1989-2025 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 73 surveillance_processus(void *argument)
|
Line 73 surveillance_processus(void *argument)
|
|
|
sigfillset(&set); |
sigfillset(&set); |
pthread_sigmask(SIG_BLOCK, &set, NULL); |
pthread_sigmask(SIG_BLOCK, &set, NULL); |
nombre_thread_surveillance_processus++; |
|
|
|
s_argument_thread = argument; |
s_argument_thread = argument; |
s_etat_processus = (*s_argument_thread).s_etat_processus; |
s_etat_processus = (*s_argument_thread).s_etat_processus; |
Line 84 surveillance_processus(void *argument)
|
Line 83 surveillance_processus(void *argument)
|
BUG(1, uprintf("General mutex error!\n")); |
BUG(1, uprintf("General mutex error!\n")); |
} |
} |
|
|
insertion_thread_surveillance(s_etat_processus, s_argument_thread); |
nombre_threads_surveillance_processus++; |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_pile_processus)) != 0) |
if (pthread_mutex_unlock(&((*s_etat_processus).mutex_pile_processus)) != 0) |
{ |
{ |
Line 92 surveillance_processus(void *argument)
|
Line 91 surveillance_processus(void *argument)
|
BUG(1, uprintf("General mutex error!\n")); |
BUG(1, uprintf("General mutex error!\n")); |
} |
} |
|
|
|
insertion_thread_surveillance(s_etat_processus, s_argument_thread); |
|
|
attente.tv_sec = 0; |
attente.tv_sec = 0; |
attente.tv_nsec = GRANULARITE_us * 1000; |
attente.tv_nsec = GRANULARITE_us * 1000; |
|
|
Line 363 surveillance_processus(void *argument)
|
Line 364 surveillance_processus(void *argument)
|
} |
} |
} |
} |
|
|
envoi_signal_thread((*s_argument_thread).thread_pere, |
envoi_signal_thread(NULL, |
|
(*s_argument_thread).thread_pere, |
rpl_siginject); |
rpl_siginject); |
break; |
break; |
} |
} |
Line 390 surveillance_processus(void *argument)
|
Line 392 surveillance_processus(void *argument)
|
} |
} |
else |
else |
{ |
{ |
perror("read"); |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
} |
} |
|
|
Line 631 surveillance_processus(void *argument)
|
Line 632 surveillance_processus(void *argument)
|
d_es_processus; |
d_es_processus; |
} |
} |
|
|
envoi_signal_thread((*s_argument_thread).thread_pere, |
envoi_signal_thread(NULL, |
|
(*s_argument_thread).thread_pere, |
rpl_siginject); |
rpl_siginject); |
|
|
if (pthread_mutex_lock(&((*s_etat_processus) |
if (pthread_mutex_lock(&((*s_etat_processus) |
Line 1427 surveillance_processus(void *argument)
|
Line 1429 surveillance_processus(void *argument)
|
fflush(stdout); |
fflush(stdout); |
} |
} |
|
|
|
if (pthread_mutex_unlock(&((*s_etat_processus) |
|
.mutex_pile_processus)) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme_processus_fils = d_es_processus; |
|
} |
|
|
retrait_thread_surveillance(s_etat_processus, s_argument_thread); |
retrait_thread_surveillance(s_etat_processus, s_argument_thread); |
|
|
|
if (pthread_mutex_lock(&((*s_etat_processus) |
|
.mutex_pile_processus)) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme_processus_fils = d_es_processus; |
|
} |
|
|
|
nombre_threads_surveillance_processus--; |
|
|
if (pthread_mutex_unlock(&((*s_etat_processus) |
if (pthread_mutex_unlock(&((*s_etat_processus) |
.mutex_pile_processus)) != 0) |
.mutex_pile_processus)) != 0) |
{ |
{ |
Line 1436 surveillance_processus(void *argument)
|
Line 1452 surveillance_processus(void *argument)
|
} |
} |
} |
} |
|
|
nombre_thread_surveillance_processus--; |
|
pthread_exit(NULL); |
pthread_exit(NULL); |
} |
} |
|
|
Line 3006 scrutation_injection(struct_processus *s
|
Line 3021 scrutation_injection(struct_processus *s
|
unsigned char tampon; |
unsigned char tampon; |
unsigned char tampon_profilage[20]; |
unsigned char tampon_profilage[20]; |
|
|
// Si on est dans le processus père, il n'y a rien à surveiller. |
|
|
|
scrutation_interruptions(s_etat_processus); |
scrutation_interruptions(s_etat_processus); |
|
|
|
// Si on est dans le processus père, il n'y a rien à surveiller. |
|
|
if ((*s_etat_processus).var_volatile_processus_racine == 0) |
if ((*s_etat_processus).var_volatile_processus_racine == 0) |
{ |
{ |
fds.fd = (*s_etat_processus).pipe_nombre_injections; |
fds.fd = (*s_etat_processus).pipe_nombre_injections; |
Line 3173 scrutation_injection(struct_processus *s
|
Line 3188 scrutation_injection(struct_processus *s
|
} |
} |
} |
} |
} |
} |
|
|
} |
} |
|
|
return; |
return; |