--- rpl/src/instructions_a1.c 2011/07/25 07:44:55 1.26 +++ rpl/src/instructions_a1.c 2013/03/16 11:31:41 1.43 @@ -1,7 +1,7 @@ /* ================================================================================ - RPL/2 (R) version 4.1.2 - Copyright (C) 1989-2011 Dr. BERTRAND Joël + RPL/2 (R) version 4.1.13 + Copyright (C) 1989-2013 Dr. BERTRAND Joël This file is part of RPL/2. @@ -73,7 +73,8 @@ instruction_abort(struct_processus *s_et } } - kill((*s_etat_processus).pid_processus_pere, SIGABORT); + envoi_signal_processus((*s_etat_processus).pid_processus_pere, + rpl_sigabort); (*s_etat_processus).requete_arret = 'Y'; attente.tv_sec = 0; @@ -81,6 +82,7 @@ instruction_abort(struct_processus *s_et while((*s_etat_processus).var_volatile_requete_arret == 0) { + scrutation_interruptions(s_etat_processus); nanosleep(&attente, NULL); INCR_GRANULARITE(attente.tv_nsec); } @@ -863,14 +865,28 @@ instruction_abs(struct_processus *s_etat if ((*s_objet_argument).type == INT) { - if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL) + if ((*((integer8 *) (*s_objet_argument).objet)) != INT64_MIN) { - (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; - return; + if ((s_objet_resultat = allocation(s_etat_processus, INT)) == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } + + (*((integer8 *) (*s_objet_resultat).objet)) = abs((*((integer8 *) + (*s_objet_argument).objet))); } + else + { + if ((s_objet_resultat = allocation(s_etat_processus, REL)) == NULL) + { + (*s_etat_processus).erreur_systeme = d_es_allocation_memoire; + return; + } - (*((integer8 *) (*s_objet_resultat).objet)) = abs((*((integer8 *) - (*s_objet_argument).objet))); + (*((real8 *) (*s_objet_resultat).objet)) = abs((real8) + ((*((integer8 *) (*s_objet_argument).objet)))); + } } /*