--- rpl/src/rpl.h 2011/08/29 07:43:02 1.112 +++ rpl/src/rpl.h 2011/09/10 20:45:07 1.119 @@ -25,7 +25,7 @@ #ifndef __RPLCAS # define _GNU_SOURCE -# define _POSIX_C_SOURCE 200112L +# define _XOPEN_SOURCE 700 #endif #define _REENTRANT @@ -311,12 +311,14 @@ union semun # define SIGABORT SIGTHR # endif // Arręt d'un processus fils depuis autre chose que STOP -# if defined(Darwin) || defined(OpenBSD) +# if defined(Darwin) || defined(OpenBSD) || defined(NetBSD) # define SIGFABORT SIGINFO # else # define SIGFABORT SIGPOLL # endif +# define SIGTEST SIGILL + // Nombre d'interruptions disponibles # define d_NOMBRE_INTERRUPTIONS 64 #endif @@ -389,6 +391,12 @@ typedef unsigned char t_8_bits; extern jmp_buf contexte; extern jmp_buf contexte_initial; + extern jmp_buf contexte_processus; + extern jmp_buf contexte_thread; + + extern int signal_test; + + extern pid_t pid_processus_pere; # ifdef SEMAPHORES_NOMMES extern pthread_mutex_t mutex_sem; @@ -429,6 +437,12 @@ typedef unsigned char t_8_bits; jmp_buf contexte; jmp_buf contexte_initial; + jmp_buf contexte_processus; + jmp_buf contexte_thread; + + int signal_test; + + pid_t pid_processus_pere; # ifdef SEMAPHORES_NOMMES pthread_mutex_t mutex_sem = PTHREAD_MUTEX_INITIALIZER; @@ -1845,6 +1859,10 @@ typedef struct processus # define RTLD_LOCAL 0 # endif + int signal; + pid_t origine_signal; + logical1 signal_a_traiter; + /* Contextes */ struct_liste_chainee *l_base_pile_contextes; @@ -2059,6 +2077,7 @@ typedef struct processus /* Traitement des erreurs */ + unsigned int compteur_violation_d_acces; unsigned int erreur_compilation; unsigned int erreur_execution; unsigned int erreur_systeme; @@ -2770,7 +2789,6 @@ void instruction_t_vers_l(struct_process void instruction_ucase(struct_processus *s_etat_processus); void instruction_uchol(struct_processus *s_etat_processus); -void instruction_undo(struct_processus *s_etat_processus); void instruction_unlock(struct_processus *s_etat_processus); void instruction_unprotect(struct_processus *s_etat_processus); void instruction_until(struct_processus *s_etat_processus); @@ -2951,6 +2969,7 @@ void retrait_thread_surveillance(struct_ struct_descripteur_thread *s_argument_thread); void rplcore(struct_processus *s_etat_processus); void scrutation_injection(struct_processus *s_etat_processus); +void scrutation_interruptions(struct_processus *s_etat_processus); void sf(struct_processus *s_etat_processus, unsigned char indice_drapeau); void *surveillance_processus(void *argument); void swap(void *variable_1, void *variable_2, unsigned long taille_octets);