1: # include   "../pipes.h"
   2: 
   3: /*
   4: **  RESYNCHRONIZE PIPES AFTER AN INTERRUPT
   5: **
   6: **	The pipes are all cleared out.  This routines must be called
   7: **	by all processes in the system simultaneously.  It should be
   8: **	called from the interrupt catching routine.
   9: */
  10: 
  11: resyncpipes()
  12: {
  13:     struct pipfrmt      buf;
  14:     register struct pipfrmt *pbuf;
  15:     register int        fd;
  16: 
  17:     pbuf = &buf;
  18:     wrpipe(P_PRIME, pbuf, 0, 0, 0);
  19:     /* synchronize the downward pipes */
  20:     fd = R_up;
  21:     if (fd >= 0)
  22:         rdpipe(P_INT, pbuf, fd);
  23:     fd = W_down;
  24:     if (fd >= 0)
  25:         wrpipe(P_INT, pbuf, fd);
  26: 
  27:     /* now the upward pipes */
  28:     fd = R_down;
  29:     if (fd >= 0)
  30:         rdpipe(P_INT, pbuf, fd);
  31:     fd = W_up;
  32:     if (fd >= 0)
  33:         wrpipe(P_INT, pbuf, fd);
  34: 
  35:     return;
  36: }
Last modified: 1980-12-17
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 2099
Valid CSS Valid XHTML 1.0 Strict