version 1.246, 2014/07/15 14:12:38
|
version 1.252, 2014/10/13 07:12:54
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.18 |
RPL/2 (R) version 4.1.19 |
Copyright (C) 1989-2014 Dr. BERTRAND Joël |
Copyright (C) 1989-2014 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 378 union semun
|
Line 378 union semun
|
|
|
#ifdef IPCS_SYSV |
#ifdef IPCS_SYSV |
# ifdef DEBUG_SEMAPHORES |
# ifdef DEBUG_SEMAPHORES |
# define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
"waiting at %s() " \ |
"waiting at %s() " \ |
"line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ |
"line #%d\n", (int) getpid(), (unsigned long long) i\ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
pthread_self(), \ |
if (value > 1) BUG(1, uprintf("Value %d\n", value)); \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
sem_wait_SysV(a); }) |
if (value > 1) BUG(1, uprintf("Value %d\n", value)); \ |
|
sem_wait_SysV(a); }) |
# define sem_post(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_post(a) ({ int value; sem_getvalue(a, &value); \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
"posting at %s() " \ |
"posting at %s() " \ |
"line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ |
"line #%d\n", (int) getpid(), (unsigned long long) \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
pthread_self(), \ |
if (value > 0) BUG(1, uprintf("Value %d\n", value)); \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
sem_post_SysV(a); }) |
if (value > 0) BUG(1, uprintf("Value %d\n", value)); \ |
|
sem_post_SysV(a); }) |
# define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ |
# define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ |
if (value == 0) BUG(1, uprintf("Value %d\n", value)); \ |
if (value == 0) BUG(1, uprintf("Value %d\n", value)); \ |
sem_destroy_SysV(a); }) |
sem_destroy_SysV(a); }) |
#else |
# else |
# define sem_destroy(a) sem_destroy_SysV(a) |
# define sem_destroy(a) sem_destroy_SysV(a) |
# define sem_wait(a) sem_wait_SysV(a) |
# define sem_wait(a) sem_wait_SysV(a) |
# define sem_post(a) sem_post_SysV(a) |
# define sem_post(a) sem_post_SysV(a) |
Line 409 union semun
|
Line 411 union semun
|
# define sem_close(a) sem_close_SysV(a) |
# define sem_close(a) sem_close_SysV(a) |
# define sem_unlink(a) sem_unlink_SysV(a) |
# define sem_unlink(a) sem_unlink_SysV(a) |
#else |
#else |
# define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ |
# ifdef DEBUG_SEMAPHORES |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
# define sem_wait(a) ({ int value; sem_getvalue(a, &value); \ |
"waiting at %s() " \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
"line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ |
"waiting at %s() " \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
"line #%d\n", (int) getpid(), (unsigned long long) \ |
if (value > 1) BUG(1, uprintf("Value %d\n", value)); sem_wait(a); }) |
pthread_self(), \ |
# define sem_post(a) ({ int value; sem_getvalue(a, &value); \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
if (value > 1) BUG(1, uprintf("Value %d\n", value)); sem_wait(a); }) |
"posting at %s() " \ |
# define sem_post(a) ({ int value; sem_getvalue(a, &value); \ |
"line #%d\n", (int) getpid(), (unsigned long long) pthread_self(), \ |
uprintf("[%d-%llu] Semaphore %s (%p) "\ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
"posting at %s() " \ |
if (value > 0) BUG(1, uprintf("Value %d\n", value)); sem_post(a); }) |
"line #%d\n", (int) getpid(), (unsigned long long) \ |
# define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ |
pthread_self(), \ |
if (value == 0) BUG(1, uprintf("Value %d\n", value)); \ |
#a, a, __FUNCTION__, __LINE__), fflush(stdout); \ |
sem_destroy(a); }) |
if (value > 0) BUG(1, uprintf("Value %d\n", value)); sem_post(a); }) |
|
# define sem_destroy(a) ({ int value; sem_getvalue(a, &value); \ |
|
if (value == 0) BUG(1, uprintf("Value %d\n", value)); \ |
|
sem_destroy(a); }) |
|
# endif |
#endif |
#endif |
|
|
|
|
Line 1700 typedef struct tableau
|
Line 1706 typedef struct tableau
|
|
|
typedef struct arbre |
typedef struct arbre |
{ |
{ |
struct_objet *objet; |
struct_objet *feuille; |
|
logical1 inversion; |
|
|
unsigned long nombre_feuilles; |
integer8 nombre_branches; |
struct arbre **feuilles; |
struct arbre **branches; |
} struct_arbre; |
} struct_arbre; |
|
|
|
|
Line 2310 typedef struct processus
|
Line 2317 typedef struct processus
|
|
|
logical1 processus_detache; |
logical1 processus_detache; |
|
|
|
enum t_type type_en_cours; |
|
|
/* Profilage */ |
/* Profilage */ |
|
|
logical1 profilage; |
logical1 profilage; |
Line 2571 void instruction_elseif(struct_processus
|
Line 2580 void instruction_elseif(struct_processus
|
void instruction_end(struct_processus *s_etat_processus); |
void instruction_end(struct_processus *s_etat_processus); |
void instruction_eng(struct_processus *s_etat_processus); |
void instruction_eng(struct_processus *s_etat_processus); |
void instruction_epsilon(struct_processus *s_etat_processus); |
void instruction_epsilon(struct_processus *s_etat_processus); |
|
void instruction_eqv(struct_processus *s_etat_processus); |
void instruction_erase(struct_processus *s_etat_processus); |
void instruction_erase(struct_processus *s_etat_processus); |
void instruction_errm(struct_processus *s_etat_processus); |
void instruction_errm(struct_processus *s_etat_processus); |
void instruction_errn(struct_processus *s_etat_processus); |
void instruction_errn(struct_processus *s_etat_processus); |
Line 3330 logical1 initialisation_fichier_acces_in
|
Line 3340 logical1 initialisation_fichier_acces_in
|
sqlite3 *sqlite, integer8 position_clef, logical1 binaire); |
sqlite3 *sqlite, integer8 position_clef, logical1 binaire); |
logical1 lancement_thread_signaux(struct_processus *s_etat_processus); |
logical1 lancement_thread_signaux(struct_processus *s_etat_processus); |
logical1 recherche_instruction_suivante(struct_processus *s_etat_processus); |
logical1 recherche_instruction_suivante(struct_processus *s_etat_processus); |
|
logical1 recherche_instruction_suivante_recursive( |
|
struct_processus *s_etat_processus, integer8 recursivite); |
logical1 retrait_variable(struct_processus *s_etat_processus, |
logical1 retrait_variable(struct_processus *s_etat_processus, |
unsigned char *nom_variable, unsigned char type); |
unsigned char *nom_variable, unsigned char type); |
logical1 retrait_variables_par_niveau(struct_processus *s_etat_processus); |
logical1 retrait_variables_par_niveau(struct_processus *s_etat_processus); |
Line 3515 struct_liste_variables_partagees *recher
|
Line 3527 struct_liste_variables_partagees *recher
|
#endif |
#endif |
|
|
/* |
/* |
-------------------------------------------------------------------------------- |
|
Fonctions gérant les arbres de simplification |
|
-------------------------------------------------------------------------------- |
|
*/ |
|
|
|
#ifndef RPLARGS |
|
struct_arbre *creation_arbre(struct_processus *s_etat_processus, |
|
struct_objet **t_objets, integer8 indice, integer8 indice_maximal); |
|
void liberation_arbre(struct_processus *s_etat_processus, |
|
struct_arbre *s_noeud); |
|
void parcours_arbre(struct_processus *s_etat_processus, struct_arbre *s_noeud); |
|
void simplification_arbre(struct_processus *s_etat_processus, |
|
struct_arbre *s_noeud); |
|
#endif |
|
|
|
/* |
|
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |
Fonctions gérant la complétion automatique |
Fonctions gérant la complétion automatique |
-------------------------------------------------------------------------------- |
-------------------------------------------------------------------------------- |