1: # include   <ingres.h>
   2: # include   "IIglobals.h"
   3: # include   <signal.h>
   4: # include   <sccs.h>
   5: 
   6: SCCSID(@(#)IIresync.c	8.1	12/31/84)
   7: 
   8: 
   9: /*
  10: **  RESYNCHRONIZE PIPES AFTER AN INTERRUPT
  11: **
  12: **	The pipes are all cleared out.  This routines must be called
  13: **	by all processes in the system simultaneously.  It should be
  14: **	called from the interrupt catching routine.
  15: */
  16: 
  17: int IISyncs[CM_MAXPROC];
  18: extern  exit();
  19: int (*IIinterrupt)() =  exit;
  20: 
  21: IIresync()
  22: {
  23:     register int    i;
  24:     pb_t        pb;
  25:     register int    stat;
  26: 
  27:     signal(SIGINT,SIG_IGN);
  28: 
  29:     /*
  30: 	**  Send SYNC blocks to all processes that are adjacent
  31: 	**	in the write direction.
  32: 	**  Arrange to ignore blocks from all processes that
  33: 	**	are adjacent in the read direction.
  34: 	*/
  35: 
  36:     IIpb_prime(&pb, PB_SYNC);
  37:     for (i = 0; i < CM_MAXPROC; i++)
  38:     {
  39:         IISyncs[i]++;
  40: 
  41:         /* send SYNC to parser */
  42:         pb.pb_proc = 1;
  43:         IIpb_write(&pb);
  44:     }
  45: 
  46:     /* ovqp buffer flush is done in IIsetup() */
  47: 
  48:     /* Get out of a retrieve and clear errors */
  49:     IIin_retrieve = 0;
  50:     IIerrflag = 0;
  51:     IIndomains = IIdomains = 0;
  52:     IInewqry = 0;
  53: 
  54: 
  55:     /* reset the signal */
  56:     signal(SIGINT, IIresync);
  57:     /* allow the user to service the interrupt */
  58:     (*IIinterrupt)(-1);
  59:     /*
  60: 	** If IIinterupt returns the user might hang in a retrieve
  61: 	*/
  62: 
  63:     IIsyserr("Interupt returned");
  64: }

Defined functions

IIresync defined in line 21; used 3 times

Defined variables

IISyncs defined in line 17; used 1 times
  • in line 39
Last modified: 1986-04-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 973
Valid CSS Valid XHTML 1.0 Strict