--- rpl/src/analyse.c 2011/08/29 07:43:02 1.53 +++ rpl/src/analyse.c 2011/10/04 19:32:35 1.59 @@ -1,6 +1,6 @@ /* ================================================================================ - RPL/2 (R) version 4.1.3 + RPL/2 (R) version 4.1.4 Copyright (C) 1989-2011 Dr. BERTRAND Joël This file is part of RPL/2. @@ -733,8 +733,10 @@ initialisation_instructions(struct_proce INSTRUCTION("CLRSWI", instruction_clrswi); INSTRUCTION("CREATE", instruction_create); INSTRUCTION("DELETE", instruction_delete); -# ifndef OS2 +# ifdef SHARED_MEMORY INSTRUCTION("DETACH", instruction_detach); +# else + INSTRUCTION("DETACH", instruction_spawn); # endif INSTRUCTION("DIAG->", instruction_diag_fleche); //INSTRUCTION("DOLIST") @@ -986,28 +988,20 @@ analyse(struct_processus *s_etat_process */ # ifndef SEMAPHORES_NOMMES - if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - return; - } - - while(sem_wait(&((*s_etat_processus).semaphore_fork)) == -1) - { - if (errno != EINTR) - { - (*s_etat_processus).erreur_systeme = d_es_processus; - return; - } - } + if (sem_post(&((*s_etat_processus).semaphore_fork)) != 0) # else - if (sem_post((*s_etat_processus).semaphore_fork) != 0) + if (sem_post((*s_etat_processus).semaphore_fork) != 0) +# endif { (*s_etat_processus).erreur_systeme = d_es_processus; return; } - while(sem_wait((*s_etat_processus).semaphore_fork) == -1) +# ifndef SEMAPHORES_NOMMES + while(sem_wait(&((*s_etat_processus).semaphore_fork)) != 0) +# else + while(sem_wait((*s_etat_processus).semaphore_fork) != 0) +# endif { if (errno != EINTR) { @@ -1015,7 +1009,6 @@ analyse(struct_processus *s_etat_process return; } } -# endif scrutation_injection(s_etat_processus);