mitre additions for cong. control
authorKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Wed, 17 Jan 1990 13:39:42 +0000 (05:39 -0800)
committerKeith Sklower <sklower@ucbvax.Berkeley.EDU>
Wed, 17 Jan 1990 13:39:42 +0000 (05:39 -0800)
SCCS-vsn: sys/netiso/tp_seq.h 7.4

usr/src/sys/netiso/tp_seq.h

index 72c899b..3b4e2b0 100644 (file)
@@ -29,7 +29,7 @@ SOFTWARE.
  *
  * $Header: tp_seq.h,v 5.1 88/10/12 12:20:59 root Exp $
  * $Source: /usr/argo/sys/netiso/RCS/tp_seq.h,v $
  *
  * $Header: tp_seq.h,v 5.1 88/10/12 12:20:59 root Exp $
  * $Source: /usr/argo/sys/netiso/RCS/tp_seq.h,v $
- *     @(#)tp_seq.h    7.3 (Berkeley) %G% *
+ *     @(#)tp_seq.h    7.4 (Berkeley) %G% *
  *
  * These macros perform sequence number arithmetic modulo (2**7 or 2**31).
  * The relevant fields in the tpcb are:
  *
  * These macros perform sequence number arithmetic modulo (2**7 or 2**31).
  * The relevant fields in the tpcb are:
@@ -65,6 +65,10 @@ SOFTWARE.
 ? ((-(int)((seq)-(operand))) < (int)(tpcb)->tp_seqhalf)\
 : !(((int)(seq)-(operand)) < (int)(tpcb)->tp_seqhalf))
        
 ? ((-(int)((seq)-(operand))) < (int)(tpcb)->tp_seqhalf)\
 : !(((int)(seq)-(operand)) < (int)(tpcb)->tp_seqhalf))
        
+#define SEQ_MIN(tpcb, a, b) ( SEQ_GT(tpcb, a, b) ? b : a)
+
+#define SEQ_MAX(tpcb, a, b) ( SEQ_GT(tpcb, a, b) ? a : b)
+
 #define SEQ_INC(tpcb, Seq) ((++Seq), ((Seq) &= (tpcb)->tp_seqmask))
 
 #define SEQ_DEC(tpcb, Seq)\
 #define SEQ_INC(tpcb, Seq) ((++Seq), ((Seq) &= (tpcb)->tp_seqmask))
 
 #define SEQ_DEC(tpcb, Seq)\