version 1.22, 2010/06/17 11:00:23
|
version 1.46.2.2, 2011/04/14 08:46:49
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.16 |
RPL/2 (R) version 4.0.23 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 20
|
Line 20
|
*/ |
*/ |
|
|
|
|
#include "rpl.conv.h" |
#include "rpl-conv.h" |
|
|
|
|
/* |
/* |
Line 183 insertion_thread_surveillance(struct_pro
|
Line 183 insertion_thread_surveillance(struct_pro
|
} |
} |
} |
} |
|
|
pthread_mutex_lock(&((*s_argument_thread).mutex)); |
pthread_mutex_lock(&((*s_argument_thread).mutex_nombre_references)); |
(*s_argument_thread).nombre_references++; |
(*s_argument_thread).nombre_references++; |
pthread_mutex_unlock(&((*s_argument_thread).mutex)); |
pthread_mutex_unlock(&((*s_argument_thread).mutex_nombre_references)); |
|
|
(*l_nouvel_objet).suivant = liste_threads_surveillance; |
(*l_nouvel_objet).suivant = liste_threads_surveillance; |
(*l_nouvel_objet).donnee = (void *) s_argument_thread; |
(*l_nouvel_objet).donnee = (void *) s_argument_thread; |
Line 378 retrait_thread_surveillance(struct_proce
|
Line 378 retrait_thread_surveillance(struct_proce
|
(*l_element_precedent).suivant = (*l_element_courant).suivant; |
(*l_element_precedent).suivant = (*l_element_courant).suivant; |
} |
} |
|
|
if (pthread_mutex_lock(&((*s_argument_thread).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_argument_thread).mutex_nombre_references)) |
|
!= 0) |
{ |
{ |
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 400 retrait_thread_surveillance(struct_proce
|
Line 401 retrait_thread_surveillance(struct_proce
|
|
|
if ((*s_argument_thread).nombre_references == 0) |
if ((*s_argument_thread).nombre_references == 0) |
{ |
{ |
if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_argument_thread) |
|
.mutex_nombre_references)) != 0) |
{ |
{ |
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 415 retrait_thread_surveillance(struct_proce
|
Line 417 retrait_thread_surveillance(struct_proce
|
} |
} |
|
|
pthread_mutex_destroy(&((*s_argument_thread).mutex)); |
pthread_mutex_destroy(&((*s_argument_thread).mutex)); |
|
pthread_mutex_destroy(&((*s_argument_thread).mutex_nombre_references)); |
free(s_argument_thread); |
free(s_argument_thread); |
} |
} |
else |
else |
{ |
{ |
if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_argument_thread) |
|
.mutex_nombre_references)) != 0) |
{ |
{ |
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 676 liberation_threads(struct_processus *s_e
|
Line 680 liberation_threads(struct_processus *s_e
|
s_argument_thread = (struct_descripteur_thread *) |
s_argument_thread = (struct_descripteur_thread *) |
(*((struct_liste_chainee *) element_courant)).donnee; |
(*((struct_liste_chainee *) element_courant)).donnee; |
|
|
if (pthread_mutex_lock(&((*s_argument_thread).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_argument_thread) |
|
.mutex_nombre_references)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 700 liberation_threads(struct_processus *s_e
|
Line 705 liberation_threads(struct_processus *s_e
|
close((*s_argument_thread) |
close((*s_argument_thread) |
.pipe_nombre_interruptions_attente[0]); |
.pipe_nombre_interruptions_attente[0]); |
|
|
if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) |
if (pthread_mutex_unlock(&((*s_argument_thread) |
!= 0) |
.mutex_nombre_references)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 709 liberation_threads(struct_processus *s_e
|
Line 714 liberation_threads(struct_processus *s_e
|
} |
} |
|
|
pthread_mutex_destroy(&((*s_argument_thread).mutex)); |
pthread_mutex_destroy(&((*s_argument_thread).mutex)); |
|
pthread_mutex_destroy(&((*s_argument_thread) |
|
.mutex_nombre_references)); |
|
|
if ((*s_argument_thread).processus_detache == d_faux) |
if ((*s_argument_thread).processus_detache == d_faux) |
{ |
{ |
Line 723 liberation_threads(struct_processus *s_e
|
Line 730 liberation_threads(struct_processus *s_e
|
} |
} |
else |
else |
{ |
{ |
if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) |
if (pthread_mutex_unlock(&((*s_argument_thread) |
!= 0) |
.mutex_nombre_references)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 1350 liberation_threads(struct_processus *s_e
|
Line 1357 liberation_threads(struct_processus *s_e
|
s_argument_thread = (struct_descripteur_thread *) |
s_argument_thread = (struct_descripteur_thread *) |
(*l_element_courant).donnee; |
(*l_element_courant).donnee; |
|
|
if (pthread_mutex_lock(&((*s_argument_thread).mutex)) != 0) |
if (pthread_mutex_lock(&((*s_argument_thread).mutex_nombre_references)) |
|
!= 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 1373 liberation_threads(struct_processus *s_e
|
Line 1381 liberation_threads(struct_processus *s_e
|
close((*s_argument_thread).pipe_interruptions[0]); |
close((*s_argument_thread).pipe_interruptions[0]); |
close((*s_argument_thread).pipe_nombre_interruptions_attente[0]); |
close((*s_argument_thread).pipe_nombre_interruptions_attente[0]); |
|
|
if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_argument_thread) |
|
.mutex_nombre_references)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 1381 liberation_threads(struct_processus *s_e
|
Line 1390 liberation_threads(struct_processus *s_e
|
} |
} |
|
|
pthread_mutex_destroy(&((*s_argument_thread).mutex)); |
pthread_mutex_destroy(&((*s_argument_thread).mutex)); |
|
pthread_mutex_destroy(&((*s_argument_thread) |
|
.mutex_nombre_references)); |
|
|
if ((*s_argument_thread).processus_detache == d_faux) |
if ((*s_argument_thread).processus_detache == d_faux) |
{ |
{ |
Line 1394 liberation_threads(struct_processus *s_e
|
Line 1405 liberation_threads(struct_processus *s_e
|
} |
} |
else |
else |
{ |
{ |
if (pthread_mutex_unlock(&((*s_argument_thread).mutex)) != 0) |
if (pthread_mutex_unlock(&((*s_argument_thread) |
|
.mutex_nombre_references)) != 0) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_processus; |
(*s_etat_processus).erreur_systeme = d_es_processus; |
sem_post(&semaphore_liste_threads); |
sem_post(&semaphore_liste_threads); |
Line 1592 verrouillage_gestionnaire_signaux()
|
Line 1604 verrouillage_gestionnaire_signaux()
|
// ce que ce soit possible. |
// ce que ce soit possible. |
|
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
while(sem_trywait(&semaphore_liste_threads) == -1) |
while(sem_wait(&semaphore_liste_threads) == -1) |
# else |
# else |
while(sem_trywait(semaphore_liste_threads) == -1) |
while(sem_wait(semaphore_liste_threads) == -1) |
# endif |
# endif |
{ |
{ |
if ((errno != EINTR) && (errno != EAGAIN)) |
if (errno != EINTR) |
{ |
{ |
pthread_sigmask(SIG_SETMASK, &oldset, NULL); |
pthread_sigmask(SIG_SETMASK, &oldset, NULL); |
|
|
Line 1613 verrouillage_gestionnaire_signaux()
|
Line 1625 verrouillage_gestionnaire_signaux()
|
BUG(1, uprintf("Lock error !\n")); |
BUG(1, uprintf("Lock error !\n")); |
return; |
return; |
} |
} |
|
|
sched_yield(); |
|
} |
} |
} |
} |
|
|
Line 1725 deverrouillage_gestionnaire_signaux()
|
Line 1735 deverrouillage_gestionnaire_signaux()
|
} |
} |
|
|
void |
void |
interruption1(int signal, siginfo_t *siginfo, void *context) |
interruption1(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
pthread_t thread; |
pthread_t thread; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
Line 1735 interruption1(int signal, siginfo_t *sig
|
Line 1747 interruption1(int signal, siginfo_t *sig
|
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
if ((signal == SIGINT) || (signal == SIGTERM)) |
|
{ |
|
// Si l'interruption provient du clavier, il n'y a pas eu d'appel |
|
// ŕ queue_in(). |
|
|
|
pid = getpid(); |
|
} |
|
else |
|
{ |
|
pid = origine_signal(signal); |
|
} |
|
# else |
|
if (siginfo != NULL) |
|
{ |
|
pid = (*siginfo).si_pid; |
|
} |
|
else |
|
{ |
|
pid = getpid(); |
|
} |
|
# endif |
|
|
switch(signal) |
switch(signal) |
{ |
{ |
case SIGALRM : |
case SIGALRM : |
{ |
{ |
if ((*siginfo).si_pid == getpid()) |
if (pid == getpid()) |
{ |
{ |
if ((s_etat_processus = recherche_thread(getpid(), |
if ((s_etat_processus = recherche_thread(getpid(), |
pthread_self())) == NULL) |
pthread_self())) == NULL) |
{ |
{ |
deverrouillage_gestionnaire_signaux(); |
deverrouillage_gestionnaire_signaux(); |
return; |
return; |
} |
} |
|
|
if (((*s_etat_processus).type_debug & d_debug_signaux) != 0) |
if (((*s_etat_processus).type_debug & d_debug_signaux) != 0) |
Line 1777 interruption1(int signal, siginfo_t *sig
|
Line 1812 interruption1(int signal, siginfo_t *sig
|
} |
} |
|
|
case SIGINT : |
case SIGINT : |
|
case SIGTERM : |
{ |
{ |
/* |
/* |
* Une vieille spécification POSIX permet au pointeur siginfo |
* Une vieille spécification POSIX permet au pointeur siginfo |
Line 1784 interruption1(int signal, siginfo_t *sig
|
Line 1820 interruption1(int signal, siginfo_t *sig
|
* Solaris suit en particulier cette spécification. |
* Solaris suit en particulier cette spécification. |
*/ |
*/ |
|
|
|
# ifndef _BROKEN_SIGINFO |
if (siginfo == NULL) |
if (siginfo == NULL) |
{ |
{ |
kill(getpid(), signal); |
kill(getpid(), signal); |
} |
} |
else if ((*siginfo).si_pid == getpid()) |
else |
|
# endif |
|
if (pid == getpid()) |
{ |
{ |
if ((s_etat_processus = recherche_thread(getpid(), |
if ((s_etat_processus = recherche_thread(getpid(), |
pthread_self())) == NULL) |
pthread_self())) == NULL) |
Line 1799 interruption1(int signal, siginfo_t *sig
|
Line 1838 interruption1(int signal, siginfo_t *sig
|
|
|
if (((*s_etat_processus).type_debug & d_debug_signaux) != 0) |
if (((*s_etat_processus).type_debug & d_debug_signaux) != 0) |
{ |
{ |
printf("[%d] SIGINT (thread %llu)\n", (int) getpid(), |
if (signal == SIGINT) |
(unsigned long long) pthread_self()); |
{ |
|
printf("[%d] SIGINT (thread %llu)\n", (int) getpid(), |
|
(unsigned long long) pthread_self()); |
|
} |
|
else |
|
{ |
|
printf("[%d] SIGTERM (thread %llu)\n", (int) getpid(), |
|
(unsigned long long) pthread_self()); |
|
} |
|
|
fflush(stdout); |
fflush(stdout); |
} |
} |
|
|
Line 1822 interruption1(int signal, siginfo_t *sig
|
Line 1870 interruption1(int signal, siginfo_t *sig
|
return; |
return; |
} |
} |
|
|
if (strncmp(getenv("LANG"), "fr", 2) == 0) |
if (signal == SIGINT) |
{ |
|
printf("+++Interruption\n"); |
|
} |
|
else |
|
{ |
{ |
printf("+++Interrupt\n"); |
if (strncmp(getenv("LANG"), "fr", 2) == 0) |
} |
{ |
|
printf("+++Interruption\n"); |
|
} |
|
else |
|
{ |
|
printf("+++Interrupt\n"); |
|
} |
|
|
fflush(stdout); |
fflush(stdout); |
|
} |
|
|
(*s_etat_processus).var_volatile_requete_arret = -1; |
(*s_etat_processus).var_volatile_requete_arret = -1; |
(*s_etat_processus).var_volatile_alarme = -1; |
(*s_etat_processus).var_volatile_alarme = -1; |
Line 1863 interruption1(int signal, siginfo_t *sig
|
Line 1914 interruption1(int signal, siginfo_t *sig
|
} |
} |
|
|
void |
void |
interruption2(int signal, siginfo_t *siginfo, void *context) |
interruption2(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
pthread_t thread; |
pthread_t thread; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
if (siginfo != NULL) |
|
{ |
|
pid = (*siginfo).si_pid; |
|
} |
|
else |
|
{ |
|
pid = getpid(); |
|
} |
|
# endif |
|
|
|
# ifndef _BROKEN_SIGINFO |
if (siginfo == NULL) |
if (siginfo == NULL) |
{ |
{ |
/* |
/* |
Line 1887 interruption2(int signal, siginfo_t *sig
|
Line 1955 interruption2(int signal, siginfo_t *sig
|
return; |
return; |
} |
} |
} |
} |
else if ((*siginfo).si_pid == getpid()) |
else |
|
# endif |
|
if (pid == getpid()) |
{ |
{ |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) |
== NULL) |
== NULL) |
Line 1935 interruption2(int signal, siginfo_t *sig
|
Line 2005 interruption2(int signal, siginfo_t *sig
|
} |
} |
|
|
void |
void |
interruption3(int signal, siginfo_t *siginfo, void *context) |
interruption3(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
static int compteur = 0; |
static int compteur = 0; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
{ |
{ |
deverrouillage_gestionnaire_signaux(); |
deverrouillage_gestionnaire_signaux(); |
Line 1995 interruption3(int signal, siginfo_t *sig
|
Line 2073 interruption3(int signal, siginfo_t *sig
|
} |
} |
|
|
void |
void |
interruption4(int signal, siginfo_t *siginfo, void *context) |
interruption4(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
{ |
{ |
deverrouillage_gestionnaire_signaux(); |
deverrouillage_gestionnaire_signaux(); |
Line 2023 interruption4(int signal, siginfo_t *sig
|
Line 2109 interruption4(int signal, siginfo_t *sig
|
} |
} |
|
|
void |
void |
interruption5(int signal, siginfo_t *siginfo, void *context) |
interruption5(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
pthread_t thread; |
pthread_t thread; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((*siginfo).si_pid == getpid()) |
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
|
if (pid == getpid()) |
{ |
{ |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) |
== NULL) |
== NULL) |
Line 2086 interruption5(int signal, siginfo_t *sig
|
Line 2181 interruption5(int signal, siginfo_t *sig
|
} |
} |
|
|
void |
void |
interruption6(int signal, siginfo_t *siginfo, void *context) |
interruption6(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
{ |
{ |
deverrouillage_gestionnaire_signaux(); |
deverrouillage_gestionnaire_signaux(); |
Line 2110 interruption6(int signal, siginfo_t *sig
|
Line 2213 interruption6(int signal, siginfo_t *sig
|
} |
} |
|
|
void |
void |
interruption7(int signal, siginfo_t *siginfo, void *context) |
interruption7(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
{ |
{ |
deverrouillage_gestionnaire_signaux(); |
deverrouillage_gestionnaire_signaux(); |
Line 2137 interruption7(int signal, siginfo_t *sig
|
Line 2248 interruption7(int signal, siginfo_t *sig
|
} |
} |
|
|
void |
void |
interruption8(int signal, siginfo_t *siginfo, void *context) |
interruption8(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
pthread_t thread; |
pthread_t thread; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((*siginfo).si_pid == getpid()) |
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
|
if (pid == getpid()) |
{ |
{ |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) |
== NULL) |
== NULL) |
Line 2180 interruption8(int signal, siginfo_t *sig
|
Line 2300 interruption8(int signal, siginfo_t *sig
|
} |
} |
|
|
void |
void |
interruption9(int signal, siginfo_t *siginfo, void *context) |
interruption9(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
{ |
{ |
deverrouillage_gestionnaire_signaux(); |
deverrouillage_gestionnaire_signaux(); |
Line 2199 interruption9(int signal, siginfo_t *sig
|
Line 2327 interruption9(int signal, siginfo_t *sig
|
fflush(stdout); |
fflush(stdout); |
} |
} |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
if (queue_in(getpid(), signal) != 0) |
|
{ |
|
return; |
|
} |
|
|
|
deverrouillage_gestionnaire_signaux(); |
|
interruption11(signal); |
|
# else |
deverrouillage_gestionnaire_signaux(); |
deverrouillage_gestionnaire_signaux(); |
interruption11(signal, siginfo, context); |
interruption11(signal, siginfo, context); |
|
# endif |
return; |
return; |
} |
} |
|
|
void |
void |
interruption10(int signal, siginfo_t *siginfo, void *context) |
interruption10(SIGHANDLER_ARGS) |
{ |
{ |
file *fichier; |
file *fichier; |
|
|
|
pid_t pid; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
unsigned char nom[8 + 64 + 1]; |
unsigned char nom[8 + 64 + 1]; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
{ |
{ |
deverrouillage_gestionnaire_signaux(); |
deverrouillage_gestionnaire_signaux(); |
Line 2246 interruption10(int signal, siginfo_t *si
|
Line 2392 interruption10(int signal, siginfo_t *si
|
} |
} |
|
|
void |
void |
interruption11(int signal, siginfo_t *siginfo, void *context) |
interruption11(SIGHANDLER_ARGS) |
{ |
{ |
|
pid_t pid; |
|
|
pthread_t thread; |
pthread_t thread; |
|
|
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((*siginfo).si_pid == getpid()) |
# ifdef _BROKEN_SIGINFO |
|
pid = origine_signal(signal); |
|
# else |
|
pid = (*siginfo).si_pid; |
|
# endif |
|
|
|
if (pid == getpid()) |
{ |
{ |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) |
== NULL) |
== NULL) |