version 1.56, 2010/08/15 14:46:25
|
version 1.57, 2010/08/17 11:59:28
|
Line 23
|
Line 23
|
#ifndef INCLUSION_RPL |
#ifndef INCLUSION_RPL |
#define INCLUSION_RPL |
#define INCLUSION_RPL |
|
|
|
#warning rpl.h defines _BROKEN_SIGINFO |
|
#define _BROKEN_SIGINFO |
|
|
#define _GNU_SOURCE |
#define _GNU_SOURCE |
#define _POSIX_C_SOURCE 200112L |
#define _POSIX_C_SOURCE 200112L |
#define _REENTRANT |
#define _REENTRANT |
Line 48
|
Line 51
|
# include "getaddrinfo-conv.h" |
# include "getaddrinfo-conv.h" |
|
|
# define sched_yield(arg) |
# define sched_yield(arg) |
#else |
|
# undef _BROKEN_SIGINFO |
|
#endif |
#endif |
|
|
|
|
Line 95
|
Line 96
|
|
|
# include <pwd.h> |
# include <pwd.h> |
|
|
|
# ifdef _BROKEN_SIGINFO |
|
# include <sys/ipc.h> |
|
# include <sys/shm.h> |
|
# endif |
|
|
# ifndef SEMAPHORES_SYSV |
# ifndef SEMAPHORES_SYSV |
# include <semaphore.h> |
# include <semaphore.h> |
# else |
# else |
Line 114
|
Line 120
|
ULONG allocated; |
ULONG allocated; |
} sem_t; |
} sem_t; |
# else |
# else |
|
# include <sys/ipc.h> |
|
# include <sys/sem.h> |
typedef int sem_t; |
typedef int sem_t; |
# endif |
# endif |
|
|
Line 187
|
Line 195
|
# define UNIX_PATH_MAX sizeof(sizecheck.sun_path) |
# define UNIX_PATH_MAX sizeof(sizecheck.sun_path) |
#endif |
#endif |
|
|
|
#ifdef _BROKEN_SIGINFO |
|
# define SIGHANDLER_ARGS int signal |
|
# ifdef SA_SIGINFO |
|
# undef SA_SIGINFO |
|
# endif |
|
# define SA_SIGINFO 0 |
|
|
|
# define kill(pid, signal) rpl_kill(pid, signal) |
|
# define pthread_kill(tid, signal) rpl_pthread_kill(tid, signal) |
|
int rpl_kill(pid_t pid, int signal); |
|
int rpl_pthread_kill(pthread_t tid, int signal); |
|
#else |
|
# define SIGHANDLER_ARGS int signal, siginfo_t *siginfo, void *context |
|
#endif |
|
|
|
#define ftok(path, proj) \ |
|
({ \ |
|
key_t key; \ |
|
struct stat s; \ |
|
while(stat(path, &s) != 0); \ |
|
errno = 0; \ |
|
key = ftok(path, proj); \ |
|
if (key != -1) \ |
|
key |= ((((key_t) s.st_dev) & 0xFF) << 8) | \ |
|
((((key_t) s.st_ino) & 0xFFFF) << 16); \ |
|
key; \ |
|
}) |
|
|
/* |
/* |
================================================================================ |
================================================================================ |
Line 214
|
Line 249
|
*/ |
*/ |
|
|
#ifndef RPLARGS |
#ifndef RPLARGS |
# if defined(Darwin) || defined(OpenBSD) |
|
# define SIGPOLL SIGINFO |
// Signaux utilisés par défaut : |
# endif |
// SIGINT |
|
// SIGTSTP |
|
// SIGCONT |
|
// SIGURG |
|
// SIGPIPE |
|
// SIGALRM |
|
|
// Arrêt par STOP |
// Arrêt par STOP |
# define SIGFSTOP SIGUSR1 |
# define SIGFSTOP SIGUSR1 |
Line 225
|
Line 265
|
// Injection de données |
// Injection de données |
# define SIGINJECT SIGQUIT |
# define SIGINJECT SIGQUIT |
// Arrêt général |
// Arrêt général |
# define SIGABORT SIGPROF |
# ifndef OpenBSD |
|
// La libpthread d'OpenBSD utilise SIGPROF |
|
# define SIGABORT SIGPROF |
|
# else |
|
# define SIGABORT SIGTHR |
|
# endif |
// Arrêt d'un processus fils depuis autre chose que STOP |
// Arrêt d'un processus fils depuis autre chose que STOP |
# define SIGFABORT SIGPOLL |
# if defined(Darwin) || defined(OpenBSD) |
|
# define SIGFABORT SIGINFO |
|
# else |
|
# define SIGFABORT SIGPOLL |
|
# endif |
|
|
// Nombre d'interruptions disponibles |
// Nombre d'interruptions disponibles |
# define d_NOMBRE_INTERRUPTIONS 64 |
# define d_NOMBRE_INTERRUPTIONS 64 |
#endif |
#endif |
Line 292 typedef unsigned char t_8_bits;
|
Line 342 typedef unsigned char t_8_bits;
|
# ifdef SEMAPHORES_NOMMES |
# ifdef SEMAPHORES_NOMMES |
# define LONGUEUR_NOM_SEMAPHORE 64 |
# define LONGUEUR_NOM_SEMAPHORE 64 |
# endif |
# endif |
|
|
# ifndef MAIN_RPL |
# ifndef MAIN_RPL |
|
# ifdef _BROKEN_SIGINFO |
|
extern int *fifos_signaux; |
|
# endif |
|
|
extern jmp_buf contexte; |
extern jmp_buf contexte; |
extern jmp_buf contexte_initial; |
extern jmp_buf contexte_initial; |
|
|
Line 329 typedef unsigned char t_8_bits;
|
Line 384 typedef unsigned char t_8_bits;
|
extern sem_t *semaphores_nommes[4]; |
extern sem_t *semaphores_nommes[4]; |
# endif |
# endif |
# else |
# else |
|
# ifdef _BROKEN_SIGINFO |
|
int *fifos_signaux; |
|
# endif |
|
|
jmp_buf contexte; |
jmp_buf contexte; |
jmp_buf contexte_initial; |
jmp_buf contexte_initial; |
|
|
Line 657 pid_t debug_fork();
|
Line 716 pid_t debug_fork();
|
# define __erreur(i) i |
# define __erreur(i) i |
# else |
# else |
# define __erreur(i) ({ if (strstr(__FUNCTION__, "recherche_variable") \ |
# define __erreur(i) ({ if (strstr(__FUNCTION__, "recherche_variable") \ |
== NULL) fprintf(stderr, "ERROR %d AT %s() LINE %d\n", \ |
== NULL) ufprintf(stderr, "ERROR %d AT %s() LINE %d\n", \ |
i, __FUNCTION__, __LINE__); i; }) |
i, __FUNCTION__, __LINE__); i; }) |
# endif |
# endif |
#else |
#else |
Line 2706 void insertion_thread_surveillance(struc
|
Line 2765 void insertion_thread_surveillance(struc
|
void integrale_romberg(struct_processus *s_etat_processus, |
void integrale_romberg(struct_processus *s_etat_processus, |
struct_objet *s_expression, unsigned char *variable, |
struct_objet *s_expression, unsigned char *variable, |
real8 a, real8 b, real8 precision); |
real8 a, real8 b, real8 precision); |
void interruption1(int signal, siginfo_t *siginfo, void *context); |
void interruption1(SIGHANDLER_ARGS); |
void interruption2(int signal, siginfo_t *siginfo, void *context); |
void interruption2(SIGHANDLER_ARGS); |
void interruption3(int signal, siginfo_t *siginfo, void *context); |
void interruption3(SIGHANDLER_ARGS); |
void interruption4(int signal, siginfo_t *siginfo, void *context); |
void interruption4(SIGHANDLER_ARGS); |
void interruption5(int signal, siginfo_t *siginfo, void *context); |
void interruption5(SIGHANDLER_ARGS); |
void interruption6(int signal, siginfo_t *siginfo, void *context); |
void interruption6(SIGHANDLER_ARGS); |
void interruption7(int signal, siginfo_t *siginfo, void *context); |
void interruption7(SIGHANDLER_ARGS); |
void interruption8(int signal, siginfo_t *siginfo, void *context); |
void interruption8(SIGHANDLER_ARGS); |
void interruption9(int signal, siginfo_t *siginfo, void *context); |
void interruption9(SIGHANDLER_ARGS); |
void interruption10(int signal, siginfo_t *siginfo, void *context); |
void interruption10(SIGHANDLER_ARGS); |
void interruption11(int signal, siginfo_t *siginfo, void *context); |
void interruption11(SIGHANDLER_ARGS); |
void inversion_matrice(struct_processus *s_etat_processus, |
void inversion_matrice(struct_processus *s_etat_processus, |
struct_matrice *s_matrice); |
struct_matrice *s_matrice); |
void lancement_daemon(struct_processus *s_etat_processus); |
void lancement_daemon(struct_processus *s_etat_processus); |
Line 2775 void valeurs_singulieres(struct_processu
|
Line 2834 void valeurs_singulieres(struct_processu
|
void verrouillage_threads_concurrents(struct_processus *s_etat_processus); |
void verrouillage_threads_concurrents(struct_processus *s_etat_processus); |
#endif |
#endif |
|
|
|
#ifndef RPLARGS |
|
#ifdef _BROKEN_SIGINFO |
|
void creation_fifos_signaux(struct_processus *s_etat_processus); |
|
void destruction_fifos_signaux(struct_processus *s_etat_processus); |
|
void liberation_fifos_signaux(struct_processus *s_etat_processus); |
|
#endif |
|
#endif |
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
Fonctions de sommation de vecteur dans perte de précision |
Fonctions de sommation de vecteur dans perte de précision |