--- rpl/src/rplexternals.h 2011/07/25 07:45:00 1.28 +++ rpl/src/rplexternals.h 2013/03/27 09:14:51 1.44 @@ -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. @@ -120,10 +120,23 @@ /* -------------------------------------------------------------------------------- + Signaux +--------------------------------------------------------------------------------*/ + +#define blockSignals \ + { sigset_t set, oldset; sigfillset(&set); \ + pthread_sigmask(SIG_BLOCK, &set, &oldset); +#define unblockSignals \ + pthread_sigmask(SIG_SETMASK, &oldset, NULL); } + +/* +-------------------------------------------------------------------------------- Constructeurs -------------------------------------------------------------------------------- */ +#define DISABLE_SET_BUT_NOT_USED_WARNING(a) if (&a != ((&a) + 1)); + #define HEADER \ int __constante; \ logical1 __evaluation; \ @@ -139,7 +152,13 @@ (*rpl_arguments).instruction_valide = 'Y'; \ (*rpl_arguments).erreur = 0; \ __constante = 0; \ - __evaluation = d_faux; + __evaluation = d_faux; \ + DISABLE_SET_BUT_NOT_USED_WARNING(__evaluation); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__type); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__indice_bit); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__indice_bloc); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__taille_bloc); \ + DISABLE_SET_BUT_NOT_USED_WARNING(__masque); #define FUNCTION \ if (__validation_instruction == d_vrai) return; \ @@ -1037,6 +1056,15 @@ /* -------------------------------------------------------------------------------- + Récupération des interruptions et des signaux +-------------------------------------------------------------------------------- +*/ + +#define pollSignalsAndInterrupts() \ + { scrutation_injection((*rpl_arguments).s_etat_processus); } while(0) + +/* +-------------------------------------------------------------------------------- Exécution d'une fonction intrinsèque -------------------------------------------------------------------------------- */