version 1.20, 2010/06/04 07:48:20
|
version 1.29, 2010/08/13 21:00:37
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.16 |
RPL/2 (R) version 4.0.18 |
Copyright (C) 1989-2010 Dr. BERTRAND Joël |
Copyright (C) 1989-2010 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 125 insertion_thread(struct_processus *s_eta
|
Line 125 insertion_thread(struct_processus *s_eta
|
} |
} |
|
|
(*l_nouvel_objet).suivant = liste_threads; |
(*l_nouvel_objet).suivant = liste_threads; |
|
|
liste_threads = l_nouvel_objet; |
liste_threads = l_nouvel_objet; |
|
|
# ifndef SEMAPHORES_NOMMES |
# ifndef SEMAPHORES_NOMMES |
Line 184 insertion_thread_surveillance(struct_pro
|
Line 183 insertion_thread_surveillance(struct_pro
|
} |
} |
} |
} |
|
|
printf("<1> +1 %d\n", (*s_argument_thread).nombre_references); |
pthread_mutex_lock(&((*s_argument_thread).mutex)); |
|
(*s_argument_thread).nombre_references++; |
|
pthread_mutex_unlock(&((*s_argument_thread).mutex)); |
|
|
(*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 391 retrait_thread_surveillance(struct_proce
|
Line 393 retrait_thread_surveillance(struct_proce
|
} |
} |
|
|
(*s_argument_thread).nombre_references--; |
(*s_argument_thread).nombre_references--; |
printf("<3> -1 %d %p\n", (*s_argument_thread).nombre_references, s_argument_thread); |
|
|
|
BUG((*s_argument_thread).nombre_references < 0, |
BUG((*s_argument_thread).nombre_references < 0, |
printf("(*s_argument_thread).nombre_references = %d\n", |
printf("(*s_argument_thread).nombre_references = %d\n", |
(int) (*s_argument_thread).nombre_references)); |
(int) (*s_argument_thread).nombre_references)); |
|
|
printf("retrait_thread_surveillance : %d\n", (*s_argument_thread).nombre_references); |
|
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)) != 0) |
Line 684 liberation_threads(struct_processus *s_e
|
Line 684 liberation_threads(struct_processus *s_e
|
} |
} |
|
|
(*s_argument_thread).nombre_references--; |
(*s_argument_thread).nombre_references--; |
printf("<1> -1 %d %p\n", (*s_argument_thread).nombre_references, s_argument_thread); |
|
|
|
BUG((*s_argument_thread).nombre_references < 0, |
BUG((*s_argument_thread).nombre_references < 0, |
printf("(*s_argument_thread).nombre_references = %d\n", |
printf("(*s_argument_thread).nombre_references = %d\n", |
Line 1359 printf("<1> -1 %d %p\n", (*s_argument_th
|
Line 1358 printf("<1> -1 %d %p\n", (*s_argument_th
|
} |
} |
|
|
(*s_argument_thread).nombre_references--; |
(*s_argument_thread).nombre_references--; |
printf("<2> -1 %d %p\n", (*s_argument_thread).nombre_references, s_argument_thread); |
|
|
|
BUG((*s_argument_thread).nombre_references < 0, |
BUG((*s_argument_thread).nombre_references < 0, |
printf("(*s_argument_thread).nombre_references = %d\n", |
printf("(*s_argument_thread).nombre_references = %d\n", |
Line 1735 interruption1(int signal, siginfo_t *sig
|
Line 1733 interruption1(int signal, siginfo_t *sig
|
|
|
volatile sig_atomic_t exclusion = 0; |
volatile sig_atomic_t exclusion = 0; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
switch(signal) |
switch(signal) |
Line 1870 interruption2(int signal, siginfo_t *sig
|
Line 1872 interruption2(int signal, siginfo_t *sig
|
pthread_t thread; |
pthread_t thread; |
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if (siginfo == NULL) |
if (siginfo == NULL) |
Line 1943 interruption3(int signal, siginfo_t *sig
|
Line 1949 interruption3(int signal, siginfo_t *sig
|
|
|
static int compteur = 0; |
static int compteur = 0; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
Line 2001 interruption4(int signal, siginfo_t *sig
|
Line 2011 interruption4(int signal, siginfo_t *sig
|
{ |
{ |
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
Line 2030 interruption5(int signal, siginfo_t *sig
|
Line 2044 interruption5(int signal, siginfo_t *sig
|
pthread_t thread; |
pthread_t thread; |
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((*siginfo).si_pid == getpid()) |
if ((*siginfo).si_pid == getpid()) |
Line 2092 interruption6(int signal, siginfo_t *sig
|
Line 2110 interruption6(int signal, siginfo_t *sig
|
{ |
{ |
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
Line 2116 interruption7(int signal, siginfo_t *sig
|
Line 2138 interruption7(int signal, siginfo_t *sig
|
{ |
{ |
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
Line 2144 interruption8(int signal, siginfo_t *sig
|
Line 2170 interruption8(int signal, siginfo_t *sig
|
pthread_t thread; |
pthread_t thread; |
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((*siginfo).si_pid == getpid()) |
if ((*siginfo).si_pid == getpid()) |
Line 2186 interruption9(int signal, siginfo_t *sig
|
Line 2216 interruption9(int signal, siginfo_t *sig
|
{ |
{ |
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
Line 2215 interruption10(int signal, siginfo_t *si
|
Line 2249 interruption10(int signal, siginfo_t *si
|
|
|
unsigned char nom[8 + 64 + 1]; |
unsigned char nom[8 + 64 + 1]; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
if ((s_etat_processus = recherche_thread(getpid(), pthread_self())) == NULL) |
Line 2253 interruption11(int signal, siginfo_t *si
|
Line 2291 interruption11(int signal, siginfo_t *si
|
pthread_t thread; |
pthread_t thread; |
struct_processus *s_etat_processus; |
struct_processus *s_etat_processus; |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
(*siginfo).si_pid=getpid(); |
|
# endif |
|
|
verrouillage_gestionnaire_signaux(); |
verrouillage_gestionnaire_signaux(); |
|
|
if ((*siginfo).si_pid == getpid()) |
if ((*siginfo).si_pid == getpid()) |