version 1.61, 2011/10/14 08:13:05
|
version 1.75, 2012/10/01 11:04:57
|
Line 1
|
Line 1
|
/* |
/* |
================================================================================ |
================================================================================ |
RPL/2 (R) version 4.1.4 |
RPL/2 (R) version 4.1.11 |
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 487 initialisation_instructions(struct_proce
|
Line 487 initialisation_instructions(struct_proce
|
INSTRUCTION("PMAX", instruction_pmax); |
INSTRUCTION("PMAX", instruction_pmax); |
INSTRUCTION("PMIN", instruction_pmin); |
INSTRUCTION("PMIN", instruction_pmin); |
INSTRUCTION("POKE", instruction_poke); |
INSTRUCTION("POKE", instruction_poke); |
|
INSTRUCTION("POLL", instruction_poll); |
INSTRUCTION("PPAR", instruction_ppar); |
INSTRUCTION("PPAR", instruction_ppar); |
INSTRUCTION("PRMD", instruction_prmd); |
INSTRUCTION("PRMD", instruction_prmd); |
INSTRUCTION("PRST", instruction_prst); |
INSTRUCTION("PRST", instruction_prst); |
Line 676 initialisation_instructions(struct_proce
|
Line 677 initialisation_instructions(struct_proce
|
INSTRUCTION("PSDEV", instruction_psdev); |
INSTRUCTION("PSDEV", instruction_psdev); |
INSTRUCTION("PURGE", instruction_purge); |
INSTRUCTION("PURGE", instruction_purge); |
INSTRUCTION("RDATE", instruction_rdate); |
INSTRUCTION("RDATE", instruction_rdate); |
|
INSTRUCTION("REGEX", instruction_regex); |
INSTRUCTION("RELAX", instruction_relax); |
INSTRUCTION("RELAX", instruction_relax); |
INSTRUCTION("RFUSE", instruction_rfuse); |
INSTRUCTION("RFUSE", instruction_rfuse); |
INSTRUCTION("RSTOP", instruction_rstop); |
INSTRUCTION("RSTOP", instruction_rstop); |
Line 755 initialisation_instructions(struct_proce
|
Line 757 initialisation_instructions(struct_proce
|
//DOLIST |
//DOLIST |
//=> { 29 42 57 } |
//=> { 29 42 57 } |
INSTRUCTION("ELSEIF", instruction_elseif); |
INSTRUCTION("ELSEIF", instruction_elseif); |
|
INSTRUCTION("FORALL", instruction_forall); |
INSTRUCTION("FORMAT", instruction_format); |
INSTRUCTION("FORMAT", instruction_format); |
//INSTRUCTION("HEIGHT") |
//INSTRUCTION("HEIGHT") |
INSTRUCTION("ITRACE", instruction_itrace); |
INSTRUCTION("ITRACE", instruction_itrace); |
Line 823 initialisation_instructions(struct_proce
|
Line 826 initialisation_instructions(struct_proce
|
INSTRUCTION("PROTECT", instruction_protect); |
INSTRUCTION("PROTECT", instruction_protect); |
INSTRUCTION("PSHPRFL", instruction_pshprfl); |
INSTRUCTION("PSHPRFL", instruction_pshprfl); |
INSTRUCTION("PULPRFL", instruction_pulprfl); |
INSTRUCTION("PULPRFL", instruction_pulprfl); |
|
INSTRUCTION("RESTART", instruction_restart); |
INSTRUCTION("REVLIST", instruction_revlist); |
INSTRUCTION("REVLIST", instruction_revlist); |
INSTRUCTION("SCATTER", instruction_scatter); |
INSTRUCTION("SCATTER", instruction_scatter); |
INSTRUCTION("SUSPEND", instruction_suspend); |
INSTRUCTION("SUSPEND", instruction_suspend); |
Line 837 initialisation_instructions(struct_proce
|
Line 841 initialisation_instructions(struct_proce
|
INSTRUCTION("CLRCNTXT", instruction_clrcntxt); |
INSTRUCTION("CLRCNTXT", instruction_clrcntxt); |
INSTRUCTION("CLRSMPHR", instruction_clrsmphr); |
INSTRUCTION("CLRSMPHR", instruction_clrsmphr); |
INSTRUCTION("CONTINUE", instruction_continue); |
INSTRUCTION("CONTINUE", instruction_continue); |
|
INSTRUCTION("CRITICAL", instruction_critical); |
INSTRUCTION("DUPCNTXT", instruction_dupcntxt); |
INSTRUCTION("DUPCNTXT", instruction_dupcntxt); |
INSTRUCTION("FUNCTION", instruction_function); |
INSTRUCTION("FUNCTION", instruction_function); |
INSTRUCTION("IMPLICIT", instruction_implicit); |
INSTRUCTION("IMPLICIT", instruction_implicit); |
Line 1018 analyse(struct_processus *s_etat_process
|
Line 1023 analyse(struct_processus *s_etat_process
|
} |
} |
} |
} |
|
|
|
/* |
|
* Verrou pour les sections_critiques |
|
*/ |
|
|
|
if (pthread_mutex_lock(&mutex_sections_critiques) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
|
if (pthread_mutex_unlock(&mutex_sections_critiques) != 0) |
|
{ |
|
(*s_etat_processus).erreur_systeme = d_es_processus; |
|
return; |
|
} |
|
|
scrutation_injection(s_etat_processus); |
scrutation_injection(s_etat_processus); |
|
|
if (fonction == NULL) |
if (fonction == NULL) |
Line 1213 analyse(struct_processus *s_etat_process
|
Line 1234 analyse(struct_processus *s_etat_process
|
temporisation.tv_nsec = (attente - temporisation.tv_sec) * |
temporisation.tv_nsec = (attente - temporisation.tv_sec) * |
1E9; |
1E9; |
|
|
while(nanosleep(&temporisation, &temporisation) == -1); |
while(nanosleep(&temporisation, &temporisation) == -1) |
|
{ |
|
if (errno != EINTR) |
|
{ |
|
break; |
|
} |
|
} |
} |
} |
|
|
horodatage_initial = horodatage_final; |
horodatage_initial = horodatage_final; |