version 1.28, 2010/06/19 15:54:51
|
version 1.39, 2010/08/30 14:14:07
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.0.16 |
RPL/2 (R) version 4.0.19 |
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 2799 copie_etat_processus(struct_processus *s
|
Line 2799 copie_etat_processus(struct_processus *s
|
# endif |
# endif |
|
|
(*s_nouvel_etat_processus).var_volatile_processus_pere = 0; |
(*s_nouvel_etat_processus).var_volatile_processus_pere = 0; |
|
(*s_nouvel_etat_processus).var_volatile_processus_racine = 0; |
(*s_nouvel_etat_processus).fichiers_graphiques = NULL; |
(*s_nouvel_etat_processus).fichiers_graphiques = NULL; |
(*s_nouvel_etat_processus).entree_standard = NULL; |
(*s_nouvel_etat_processus).entree_standard = NULL; |
(*s_nouvel_etat_processus).s_marques = NULL; |
(*s_nouvel_etat_processus).s_marques = NULL; |
Line 2829 copie_etat_processus(struct_processus *s
|
Line 2830 copie_etat_processus(struct_processus *s
|
(*s_nouvel_etat_processus).nombre_interruptions_non_affectees = 0; |
(*s_nouvel_etat_processus).nombre_interruptions_non_affectees = 0; |
|
|
(*s_nouvel_etat_processus).at_exit = NULL; |
(*s_nouvel_etat_processus).at_exit = NULL; |
|
(*s_nouvel_etat_processus).at_poke = NULL; |
|
(*s_nouvel_etat_processus).traitement_at_poke = 'N'; |
|
|
for(i = 0; i < d_NOMBRE_INTERRUPTIONS; i++) |
for(i = 0; i < d_NOMBRE_INTERRUPTIONS; i++) |
{ |
{ |
Line 2840 copie_etat_processus(struct_processus *s
|
Line 2843 copie_etat_processus(struct_processus *s
|
|
|
if ((*s_nouvel_etat_processus).generateur_aleatoire != NULL) |
if ((*s_nouvel_etat_processus).generateur_aleatoire != NULL) |
{ |
{ |
(*s_nouvel_etat_processus).generateur_aleatoire = NULL; |
if (((*s_nouvel_etat_processus).generateur_aleatoire = |
} |
gsl_rng_clone((*s_etat_processus).generateur_aleatoire)) |
|
== NULL) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
|
return(NULL); |
|
} |
|
|
(*s_nouvel_etat_processus).type_generateur_aleatoire = NULL; |
gsl_rng_set((*s_nouvel_etat_processus).generateur_aleatoire, |
|
gsl_rng_get((*s_etat_processus).generateur_aleatoire)); |
|
} |
|
|
// Copie de la localisation |
// Copie de la localisation |
|
|
Line 3971 debug_fork()
|
Line 3981 debug_fork()
|
pthread_mutex_lock(&mutex_allocation); |
pthread_mutex_lock(&mutex_allocation); |
pid = fork(); |
pid = fork(); |
|
|
|
# ifdef OS2 |
if (pid == 0) |
if (pid == 0) |
{ |
{ |
|
sem_init(&semaphore_liste_threads, 0, 1); |
|
sem_init(&semaphore_gestionnaires_signaux, 0, 0); |
|
sem_init(&semaphore_gestionnaires_signaux_atomique, 0, 1); |
|
sem_init(&((*s_etat_processus).semaphore_fork), 0, 0); |
|
} |
|
# endif |
|
|
|
if (pid == 0) |
|
{ |
|
# ifdef _BROKEN_SIGINFO |
|
liberation_fifos_signaux(s_etat_processus); |
|
creation_fifos_signaux(s_etat_processus); |
|
# endif |
|
|
pthread_mutex_destroy(&mutex_allocation); |
pthread_mutex_destroy(&mutex_allocation); |
debug_memoire_initialisation(); |
debug_memoire_initialisation(); |
} |
} |