version 1.84, 2013/03/21 14:39:09
|
version 1.87, 2013/05/23 12:45:08
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.13 |
RPL/2 (R) version 4.1.14 |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
Copyright (C) 1989-2013 Dr. BERTRAND Joël |
|
|
This file is part of RPL/2. |
This file is part of RPL/2. |
Line 964 analyse_instruction(struct_processus *s_
|
Line 964 analyse_instruction(struct_processus *s_
|
void |
void |
analyse(struct_processus *s_etat_processus, void (*fonction)()) |
analyse(struct_processus *s_etat_processus, void (*fonction)()) |
{ |
{ |
static logical1 initialisation = d_faux; |
|
|
|
real8 attente; |
real8 attente; |
real8 pourcentage; |
real8 pourcentage; |
real8 temps_cpu; |
real8 temps_cpu; |
Line 1161 analyse(struct_processus *s_etat_process
|
Line 1159 analyse(struct_processus *s_etat_process
|
{ |
{ |
if ((*s_etat_processus).test_instruction == 'N') |
if ((*s_etat_processus).test_instruction == 'N') |
{ |
{ |
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
if (pthread_mutex_lock(&(*s_etat_processus).mutex) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
} |
|
else |
{ |
{ |
affectation_interruptions_logicielles(s_etat_processus); |
if ((*s_etat_processus).nombre_interruptions_non_affectees != 0) |
|
{ |
|
affectation_interruptions_logicielles(s_etat_processus); |
|
} |
|
|
|
pthread_mutex_unlock(&(*s_etat_processus).mutex); |
} |
} |
|
|
if (((*s_etat_processus).nombre_interruptions_en_queue != 0) && |
if (((*s_etat_processus).nombre_interruptions_en_queue != 0) && |
Line 1196 analyse(struct_processus *s_etat_process
|
Line 1203 analyse(struct_processus *s_etat_process
|
|
|
gettimeofday(&horodatage_final, NULL); |
gettimeofday(&horodatage_final, NULL); |
|
|
if (initialisation == d_vrai) |
if ((*s_etat_processus).initialisation_scheduler == d_vrai) |
{ |
{ |
temps_reel = ((real8) (horodatage_final.tv_sec - |
temps_reel = ((real8) (horodatage_final.tv_sec - |
horodatage_initial.tv_sec)) + |
horodatage_initial.tv_sec)) + |
Line 1253 analyse(struct_processus *s_etat_process
|
Line 1260 analyse(struct_processus *s_etat_process
|
} |
} |
else |
else |
{ |
{ |
initialisation = d_vrai; |
(*s_etat_processus).initialisation_scheduler = d_vrai; |
|
|
horodatage_initial = horodatage_final; |
horodatage_initial = horodatage_final; |
usage_initial = usage_final; |
usage_initial = usage_final; |
Line 1261 analyse(struct_processus *s_etat_process
|
Line 1268 analyse(struct_processus *s_etat_process
|
} |
} |
else |
else |
{ |
{ |
initialisation = d_faux; |
(*s_etat_processus).initialisation_scheduler = d_faux; |
} |
} |
|
|
/* |
/* |