version 1.37, 2010/05/22 21:45:50
|
version 1.47, 2010/07/12 15:55:01
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.15 |
RPL/2 (R) version 4.0.17 |
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 438 int sem_getvalue2(sem_t *semaphore, int
|
Line 438 int sem_getvalue2(sem_t *semaphore, int
|
void analyse_post_mortem(); |
void analyse_post_mortem(); |
void *debug_memoire_ajout(size_t taille, const unsigned char *fonction, |
void *debug_memoire_ajout(size_t taille, const unsigned char *fonction, |
unsigned long ligne, const unsigned char *argument); |
unsigned long ligne, const unsigned char *argument); |
|
void debug_memoire_initialisation(); |
void *debug_memoire_modification(void *pointeur, size_t taille, |
void *debug_memoire_modification(void *pointeur, size_t taille, |
const unsigned char *fonction, unsigned long ligne, |
const unsigned char *fonction, unsigned long ligne, |
const unsigned char *argument); |
const unsigned char *argument); |
void debug_memoire_reinitialisation(); |
|
void debug_memoire_retrait(void *ptr); |
void debug_memoire_retrait(void *ptr); |
void debug_memoire_verification(); |
void debug_memoire_verification(); |
|
|
|
pid_t debug_fork(); |
|
|
#define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, #s) |
#define malloc(s) debug_memoire_ajout(s, __FUNCTION__, __LINE__, #s) |
#define free(s) debug_memoire_retrait(s) |
#define free(s) debug_memoire_retrait(s) |
#define realloc(s, t) debug_memoire_modification(s, t, \ |
#define realloc(s, t) debug_memoire_modification(s, t, \ |
__FUNCTION__, __LINE__, #t) |
__FUNCTION__, __LINE__, #t) |
|
#define fork() debug_fork() |
#endif |
#endif |
|
|
#ifdef DEBUG_RETURN |
#ifdef DEBUG_RETURN |
Line 488 void debug_memoire_verification();
|
Line 491 void debug_memoire_verification();
|
if (value == 0) BUG(1, uprintf("Value %d\n", value)); sem_destroy(a); }) |
if (value == 0) BUG(1, uprintf("Value %d\n", value)); sem_destroy(a); }) |
#endif |
#endif |
|
|
#ifdef DEBUG_MALLOC |
|
#define malloc(taille) ({ size_t s = taille; void *p; \ |
|
p = malloc(taille); if (p != NULL) memset(p, 0, s); \ |
|
/*uprintf("[%d-%llu] Allocating %p (%d bytes) at %s() line #%d\n", \ |
|
(int) getpid(), (unsigned long long) pthread_self(), p, \ |
|
(int) s, __FUNCTION__, __LINE__); fflush(stdout); */ p; }) |
|
#endif |
|
|
|
#ifdef DEBUG_FREE |
|
#define free(ptr) ({ void *p = ptr; \ |
|
/*uprintf("[%d-%llu] Freeing %p (%d bytes) at %s() line #%d\n", \ |
|
(int) getpid(), (unsigned long long) pthread_self(), p, \ |
|
(int) sizeof(p), __FUNCTION__, __LINE__); fflush(stdout); */ \ |
|
if (p != NULL) memset(p, 0, sizeof(p)); free(p); }) |
|
#endif |
|
|
|
/* |
/* |
================================================================================ |
================================================================================ |
Line 742 void debug_memoire_verification();
|
Line 730 void debug_memoire_verification();
|
# define d_ex_enregistrement_inexistant __erreur(79) |
# define d_ex_enregistrement_inexistant __erreur(79) |
# define d_ex_clef_inexistante __erreur(80) |
# define d_ex_clef_inexistante __erreur(80) |
# define d_ex_nom_implicite __erreur(81) |
# define d_ex_nom_implicite __erreur(81) |
|
# define d_ex_version_bibliotheque __erreur(82) |
#endif |
#endif |
|
|
|
|
Line 1143 typedef struct descripteur_thread
|
Line 1132 typedef struct descripteur_thread
|
pthread_t thread_pere; |
pthread_t thread_pere; |
|
|
pthread_mutex_t mutex; |
pthread_mutex_t mutex; |
|
|
volatile logical1 thread_actif; |
volatile logical1 thread_actif; |
|
|
int pipe_erreurs[2]; |
int pipe_erreurs[2]; |
Line 1223 typedef struct liste_pile_systeme
|
Line 1213 typedef struct liste_pile_systeme
|
|
|
/* |
/* |
type clôture : |
type clôture : |
C CASE : END termine un test SELECT/CASE/THEN/END/DEFAULT/END. |
C SELECT : END termine un test SELECT/DEFAULT/END. |
D DO : END termine une boucle DO/UNTIL/END. |
D DO : END termine une boucle DO/UNTIL/END. |
I IF : END termine un test IF/THEN (ELSE)/END. |
I IF : END termine un test IF/THEN (ELSE)/END. |
J IFERR : END termine un test IFERR/THEN (ELSE)/END. |
J IFERR : END termine un test IFERR/THEN (ELSE)/END. |
W WHILE : END termine une boucle WHILE/REPEAT/END. |
K CASE : END termine un test CASE/THEN/END |
|
W WHILE : END termine une boucle WHILE/REPEAT/END. |
F FOR : NEXT ou STEP termine une boucle avec compteur. |
|
S START : NEXT ou STEP termine une boucle sans compteur. |
F FOR : NEXT ou STEP termine une boucle avec compteur. |
L LOOP : boucle utilisé dans le traitement de l'instruction RETURN. |
S START : NEXT ou STEP termine une boucle sans compteur. |
|
L LOOP : boucle utilisé dans le traitement de l'instruction RETURN. |
Elle correspond à une boucle FOR ou START mais sans son |
Elle correspond à une boucle FOR ou START mais sans son |
initialisation. |
initialisation. |
*/ |
*/ |
Line 1863 typedef struct processus
|
Line 1854 typedef struct processus
|
|
|
// Mutex spécifique au processus et donnant accès à la pile des processus |
// Mutex spécifique au processus et donnant accès à la pile des processus |
pthread_mutex_t mutex; |
pthread_mutex_t mutex; |
|
pthread_mutex_t mutex_allocation; |
|
|
// Sémaphore autorisant les fork() |
// Sémaphore autorisant les fork() |
sem_t |
sem_t |
Line 2623 void scrutation_injection(struct_process
|
Line 2615 void scrutation_injection(struct_process
|
void sf(struct_processus *s_etat_processus, unsigned char indice_drapeau); |
void sf(struct_processus *s_etat_processus, unsigned char indice_drapeau); |
void *surveillance_processus(void *argument); |
void *surveillance_processus(void *argument); |
void swap(void *variable_1, void *variable_2, unsigned long taille_octets); |
void swap(void *variable_1, void *variable_2, unsigned long taille_octets); |
|
void trace(struct_processus *s_etat_processus, FILE *flux); |
void traitement_asynchrone_exceptions_gsl(struct_processus *s_etat_processus); |
void traitement_asynchrone_exceptions_gsl(struct_processus *s_etat_processus); |
void traitement_exceptions_gsl(const char *reason, const char *file, |
void traitement_exceptions_gsl(const char *reason, const char *file, |
int line, int gsl_errno); |
int line, int gsl_errno); |