version 1.28, 2011/07/25 07:44:55
|
version 1.38, 2012/04/03 21:26:37
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.2 |
RPL/2 (R) version 4.1.7 |
Copyright (C) 1989-2011 Dr. BERTRAND Joël |
Copyright (C) 1989-2012 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
|
|
Line 608 instruction_continue(struct_processus *s
|
Line 608 instruction_continue(struct_processus *s
|
.thread).pid == (*(*((struct_processus_fils *) |
.thread).pid == (*(*((struct_processus_fils *) |
(*(*l_element_courant).donnee).objet)).thread).pid) |
(*(*l_element_courant).donnee).objet)).thread).pid) |
{ |
{ |
if (kill((*(*((struct_processus_fils *) |
if (envoi_signal_processus( |
(*s_objet).objet)).thread).pid, SIGCONT) != 0) |
(*(*((struct_processus_fils *) |
|
(*s_objet).objet)).thread).pid, rpl_sigcont) |
|
!= 0) |
{ |
{ |
// Le processus est peut-être dans l'état zombie. |
// Le processus est peut-être dans l'état zombie. |
} |
} |
Line 639 instruction_continue(struct_processus *s
|
Line 641 instruction_continue(struct_processus *s
|
(*(*l_element_courant).donnee).objet)).thread) |
(*(*l_element_courant).donnee).objet)).thread) |
.pid)) |
.pid)) |
{ |
{ |
if (pthread_kill((*(*((struct_processus_fils *) |
if (envoi_signal_thread( |
(*s_objet).objet)).thread).tid, SIGCONT) |
(*(*((struct_processus_fils *) |
|
(*s_objet).objet)).thread).tid, rpl_sigcont) |
!= 0) |
!= 0) |
{ |
{ |
// Le thread est peut-être dans l'état zombie. |
// Le thread est peut-être dans l'état zombie. |
Line 833 instruction_clrfuse(struct_processus *s_
|
Line 836 instruction_clrfuse(struct_processus *s_
|
================================================================================ |
================================================================================ |
*/ |
*/ |
|
|
void |
static struct_objet * |
instruction_crtab(struct_processus *s_etat_processus) |
creation_table(struct_processus *s_etat_processus, |
|
struct_liste_chainee *dimensions) |
{ |
{ |
struct_liste_chainee *l_element_courant; |
struct_objet *s_table; |
|
|
struct_objet *s_objet_argument; |
unsigned long i; |
struct_objet *s_objet_resultat; |
|
|
|
struct_objet * |
if ((s_table = allocation(s_etat_processus, TBL)) == NULL) |
creation_table(struct_liste_chainee *dimensions) |
|
{ |
{ |
struct_objet *s_table; |
return(NULL); |
|
} |
unsigned long i; |
|
|
|
if ((s_table = allocation(s_etat_processus, TBL)) == NULL) |
|
{ |
|
return(NULL); |
|
} |
|
|
|
(*((struct_tableau *) (*s_table).objet)).nombre_elements = |
(*((struct_tableau *) (*s_table).objet)).nombre_elements = |
(unsigned long) (*((integer8 *) (*(*dimensions).donnee).objet)); |
(unsigned long) (*((integer8 *) (*(*dimensions).donnee).objet)); |
|
|
dimensions = (*dimensions).suivant; |
dimensions = (*dimensions).suivant; |
|
|
if (((*((struct_tableau *) (*s_table).objet)).elements = |
if (((*((struct_tableau *) (*s_table).objet)).elements = |
malloc((*((struct_tableau *) (*s_table).objet)) |
malloc((*((struct_tableau *) (*s_table).objet)) |
.nombre_elements * sizeof(struct_objet *))) == NULL) |
.nombre_elements * sizeof(struct_objet *))) == NULL) |
{ |
{ |
return(NULL); |
return(NULL); |
} |
} |
|
|
if (dimensions == NULL) |
if (dimensions == NULL) |
|
{ |
|
for(i = 0; i < (*((struct_tableau *) (*s_table).objet)) |
|
.nombre_elements; i++) |
{ |
{ |
for(i = 0; i < (*((struct_tableau *) (*s_table).objet)) |
if (((*((struct_tableau *) (*s_table).objet)).elements[i] = |
.nombre_elements; i++) |
allocation(s_etat_processus, LST)) == NULL) |
{ |
{ |
if (((*((struct_tableau *) (*s_table).objet)).elements[i] = |
return(NULL); |
allocation(s_etat_processus, LST)) == NULL) |
|
{ |
|
return(NULL); |
|
} |
|
} |
} |
} |
} |
else |
} |
|
else |
|
{ |
|
for(i = 0; i < (*((struct_tableau *) (*s_table).objet)) |
|
.nombre_elements; i++) |
{ |
{ |
for(i = 0; i < (*((struct_tableau *) (*s_table).objet)) |
if (((*((struct_tableau *) (*s_table).objet)).elements[i] = |
.nombre_elements; i++) |
creation_table(s_etat_processus, dimensions)) == NULL) |
{ |
{ |
if (((*((struct_tableau *) (*s_table).objet)).elements[i] = |
return(NULL); |
creation_table(dimensions)) == NULL) |
|
{ |
|
return(NULL); |
|
} |
|
} |
} |
} |
} |
|
|
return(s_table); |
|
} |
} |
|
|
|
return(s_table); |
|
} |
|
|
|
void |
|
instruction_crtab(struct_processus *s_etat_processus) |
|
{ |
|
struct_liste_chainee *l_element_courant; |
|
|
|
struct_objet *s_objet_argument; |
|
struct_objet *s_objet_resultat; |
|
|
(*s_etat_processus).erreur_execution = d_ex; |
(*s_etat_processus).erreur_execution = d_ex; |
|
|
if ((*s_etat_processus).affichage_arguments == 'Y') |
if ((*s_etat_processus).affichage_arguments == 'Y') |
Line 961 instruction_crtab(struct_processus *s_et
|
Line 965 instruction_crtab(struct_processus *s_et
|
l_element_courant = (*l_element_courant).suivant; |
l_element_courant = (*l_element_courant).suivant; |
} |
} |
|
|
if ((s_objet_resultat = |
if ((s_objet_resultat = creation_table(s_etat_processus, |
creation_table((*s_objet_argument).objet)) == NULL) |
(*s_objet_argument).objet)) == NULL) |
{ |
{ |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
(*s_etat_processus).erreur_systeme = d_es_allocation_memoire; |
return; |
return; |