C SOUCI     SOURCE    CB215821  24/07/17    21:15:18     11961          
C  CE FONCTEUR GERE LA SIGNALISATION DES SOUCIS
C  SUIVI PAR UN ENTIER IL POSITIONNE LE SOUCI SUR LE THREAD COURANT
C  Tout seul il rend le souci courant sous forme de logique
C  LE SOUCI EST REMIS A ZERO PAR UN APPEL AVEC 0
C                                                                        
      SUBROUTINE SOUCI
      IMPLICIT INTEGER(I-N)                                                           
-INC CCNOYAU         
-INC SMBLOC                                                       

-INC PPARAM
-INC CCOPTIO
-INC CCASSIS
      LOGICAL SOUCOU
*
      MBSOU=0
      CALL LIRENT(mbsou,0,iretou)
      if (iretou.eq.0) goto 600
      GOTO 350
*
*  l'entry soucis permet de signaler un soucis dans un sous programme
*  sur le thread courant
*
      entry soucis(mbso)
      mbsou=mbso
      iretou=-1
*
 350  continue
** appele avec 0 on reinitialise le souci
      ith=max(1,oothrd)
      imesou(ith)=max(mbsou,imesou(ith))
      if (mbsou.eq.0) imesou(ith)=0
*
 600  continue
*
      if (iretou.ne.-1) then
      ith=max(1,oothrd)
       soucou=imesou(ith).ne.0
       call ecrlog(soucou)
      endif
      return
      end


 
 
 
 
 
 
 
 
 
 
