--- rpl/src/instructions_e1.c 2011/06/21 07:45:24 1.21 +++ rpl/src/instructions_e1.c 2012/10/01 11:05:04 1.38 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.0.prerelease.1 - Copyright (C) 1989-2011 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.11 + Copyright (C) 1989-2012 Dr. BERTRAND Joël This file is part of RPL/2. @@ -229,6 +229,10 @@ instruction_end(struct_processus *s_etat printf(" (expression 2)]\n"); printf(" END\n\n"); + printf(" CRITICAL\n"); + printf(" (expression)\n"); + printf(" END\n\n"); + printf(" DO\n"); printf(" (expression)\n"); printf(" UNTIL\n"); @@ -264,6 +268,12 @@ instruction_end(struct_processus *s_etat return; } + if ((*s_etat_processus).l_base_pile_systeme == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_processus; + return; + } + if (((*(*s_etat_processus).l_base_pile_systeme).type_cloture == 'I') || ((*(*s_etat_processus).l_base_pile_systeme).type_cloture == 'J')) { @@ -416,7 +426,24 @@ instruction_end(struct_processus *s_etat return; } } - else + else if ((*(*s_etat_processus).l_base_pile_systeme).type_cloture == 'Q') + { + depilement_pile_systeme(s_etat_processus); + + if ((*s_etat_processus).erreur_systeme != d_es) + { + return; + } + + if (pthread_mutex_unlock(&mutex_sections_critiques) != 0) + { + (*s_etat_processus).erreur_systeme = d_es_processus; + return; + } + + (*s_etat_processus).sections_critiques--; + } + else { (*s_etat_processus).erreur_systeme = d_es_end_incoherent; }