1: # include   "../ingres.h"
   2: # include   "../aux.h"
   3: # include   "../pipes.h"
   4: # include   "../tree.h"
   5: # include   "../symbol.h"
   6: # include   "decomp.h"
   7: 
   8: int Synconly, Error_flag;
   9: 
  10: call_dbu(code, errflag)
  11: int code;
  12: int errflag;
  13: 
  14: /*
  15: **	Call the appropriate dbu with the arguments
  16: **	given in the globals Pc and Pv. Code is a
  17: **	number identifing which dbu to call. Errflag
  18: **	indicates whether an error return from the dbu
  19: **	is possibly expected.
  20: **
  21: **	If errflag < 0 then call_dbu will not wait for sync.
  22: **	If errflag = 0 then call_dbu will syserr on an error
  23: **	If errflag > 0 then call_dbu will return error value
  24: */
  25: 
  26: {
  27:     struct pipfrmt  pipe;
  28:     register int    i, j;
  29:     extern char *Pv[];
  30:     extern int  Pc;
  31: 
  32: #	ifdef xDTR1
  33:     if (tTf(3, 0))
  34:         printf("Calling DBU %d\n", code);
  35:     if (tTf(3, 1))
  36:         prargs(Pc, Pv);
  37: #	endif
  38: 
  39:     wrpipe(P_PRIME, &pipe, EXEC_DBU, 0, code);
  40:     i = 0;
  41:     j = Pc;
  42:     while (j--)
  43:         wrpipe(P_NORM, &pipe, W_dbu, Pv[i++], 0);
  44:     wrpipe(P_END, &pipe, W_dbu);
  45: 
  46:     Error_flag = 0;
  47:     if (errflag >= 0)
  48:     {
  49:         Synconly++;
  50:         rdpipe(P_PRIME, &pipe);
  51:         rdpipe(P_SYNC, &pipe, R_dbu);
  52:         Synconly = 0;
  53:         if (Error_flag && !errflag)
  54:         {
  55:             prargs(Pc, Pv);
  56:             syserr("call_dbu:%d,ret %d", code, Error_flag);
  57:         }
  58:     }
  59:     return(Error_flag);
  60: 
  61: }
  62: 
  63: 
  64: proc_error(s1, rpipnum)
  65: struct pipfrmt  *s1;
  66: int     rpipnum;
  67: 
  68: /*
  69: **	Proc_error is called from rdpipe if an error
  70: **	block is encountered. If Synconly is true then
  71: **	the dbu request was initiated by decomp.
  72: **	Otherwise the error block(s) are passed on up.
  73: */
  74: 
  75: {
  76:     extern int      Synconly, Error_flag;
  77:     register struct pipfrmt *s;
  78:     register int        fd;
  79:     struct pipfrmt      t;
  80: 
  81:     fd = rpipnum;
  82:     s = s1;
  83: 
  84:     if (Synconly)
  85:     {
  86:         Synconly = 0;
  87:         Error_flag = s->err_id;
  88:         rdpipe(P_SYNC, s, fd);      /*  throw away the error message  */
  89:     }
  90:     else
  91:     {
  92:         wrpipe(P_PRIME, &t, s->exec_id, 0, s->func_id);
  93:         t.err_id = s->err_id;
  94: 
  95:         copypipes(s, fd, &t, W_up);
  96:         rdpipe(P_PRIME, s);
  97:     }
  98: }
  99: 
 100: /*
 101: **	SYSTEM RELATION DESCRIPTOR CACHE DEFINITION
 102: **
 103: */
 104: 
 105: struct descriptor   Inddes;
 106: 
 107: 
 108: struct desxx    Desxx[] =
 109: {
 110:     "indexes",  &Inddes,    0,
 111:     0
 112: };

Defined functions

call_dbu defined in line 10; never used
proc_error defined in line 64; never used

Defined variables

Desxx defined in line 108; never used
Error_flag defined in line 8; used 6 times
Inddes defined in line 105; used 1 times
Synconly defined in line 8; used 5 times
Last modified: 1995-02-07
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 3011
Valid CSS Valid XHTML 1.0 Strict