--- rpl/src/instructions_s10.c 2010/05/25 18:09:44 1.12 +++ rpl/src/instructions_s10.c 2010/08/06 15:33:02 1.20 @@ -1,6 +1,6 @@ /* ================================================================================ - RPL/2 (R) version 4.0.16 + RPL/2 (R) version 4.0.18 Copyright (C) 1989-2010 Dr. BERTRAND Joël This file is part of RPL/2. @@ -20,7 +20,7 @@ */ -#include "rpl.conv.h" +#include "rpl-conv.h" /* @@ -397,6 +397,7 @@ instruction_spawn(struct_processus *s_et return; } +# ifndef OS2 if (pthread_attr_setschedpolicy(&attributs, SCHED_OTHER) != 0) { (*s_etat_processus).erreur_systeme = d_es_processus; @@ -414,6 +415,7 @@ instruction_spawn(struct_processus *s_et (*s_etat_processus).erreur_systeme = d_es_processus; return; } +# endif /* * Création de l'objet à retourner @@ -459,25 +461,23 @@ instruction_spawn(struct_processus *s_et (*s_argument_thread).set = set; (*s_argument_thread).oldset = oldset; - -# ifdef DEBUG_MEMOIRE - debug_memoire_verrouillage(); -# endif + (*s_argument_thread).thread_actif = d_faux; if (pthread_create(&thread_id, &attributs, lancement_thread, s_argument_thread) != 0) { -# ifdef DEBUG_MEMOIRE - debug_memoire_deverrouillage(); -# endif - (*s_etat_processus).erreur_systeme = d_es_processus; return; } -# ifdef DEBUG_MEMOIRE - debug_memoire_deverrouillage(); -# endif + attente.tv_sec = 0; + attente.tv_nsec = GRANULARITE_us * 1000; + + while((*s_argument_thread).thread_actif == d_faux) + { + nanosleep(&attente, NULL); + INCR_GRANULARITE(attente.tv_nsec); + } if (pthread_attr_destroy(&attributs) != 0) { @@ -498,6 +498,7 @@ instruction_spawn(struct_processus *s_et return; } +# ifndef OS2 if (pthread_attr_setschedpolicy(&attributs, SCHED_OTHER) != 0) { (*s_etat_processus).erreur_systeme = d_es_processus; @@ -516,6 +517,7 @@ instruction_spawn(struct_processus *s_et (*s_etat_processus).erreur_systeme = d_es_processus; return; } +# endif // Attente de l'affectation de la grandeur processus.tid par le thread fils. @@ -660,25 +662,13 @@ instruction_spawn(struct_processus *s_et // Lancement du thread de surveillance -# ifdef DEBUG_MEMOIRE - debug_memoire_verrouillage(); -# endif - if (pthread_create(&thread_surveillance, &attributs, surveillance_processus, s_argument_thread) != 0) { -# ifdef DEBUG_MEMOIRE - debug_memoire_deverrouillage(); -# endif - (*s_etat_processus).erreur_systeme = d_es_processus; return; } -# ifdef DEBUG_MEMOIRE - debug_memoire_deverrouillage(); -# endif - if (pthread_attr_destroy(&attributs) != 0) { (*s_etat_processus).erreur_systeme = d_es_processus; @@ -912,6 +902,7 @@ instruction_sqldisconnect(struct_process "MYSQL") == 0) { # ifdef MYSQL_SUPPORT + if ((*((struct_connecteur_sql *) (*(*l_element_courant) .donnee).objet)).descripteur.mysql == (*((struct_connecteur_sql *) (*s_objet).objet)) @@ -923,6 +914,7 @@ instruction_sqldisconnect(struct_process { drapeau = d_faux; } + # else if ((*s_etat_processus).langue == 'F') @@ -944,6 +936,7 @@ instruction_sqldisconnect(struct_process .type, "POSTGRESQL") == 0) { # ifdef POSTGRESQL_SUPPORT + if ((*((struct_connecteur_sql *) (*(*l_element_courant) .donnee).objet)).descripteur.postgresql == (*((struct_connecteur_sql *) (*s_objet).objet))