FreeBSD/sys/fs/nfsclient/nfs_clstate.c
/*
 * Compare the two seqids for ordering. The trick is that the seqids can
 * wrap around from 0xffffffff->0, so check for the cases where one
 * has wrapped around.
 * Return 1 if seqid1 comes before seqid2, 0 otherwise.
 */
Compare the two seqids for ordering. The trick is that the seqids can
wrap around from 0xffffffff->0, so check for the cases where one
has wrapped around.
Return 1 if seqid1 comes before seqid2, 0 otherwise.
Compare the two seqids for ordering . The trick is that the seqids can wrap around from 0xffffffff - > 0 so check for the cases where one has wrapped around . Return 1 if seqid1 comes before seqid2 0 otherwise .
static int
nfscl_seq(uint32_t seqid1, uint32_t seqid2)
{
	if (seqid2 > seqid1 && (seqid2 - seqid1) >= 0x7fffffff)
		return (0);
	if (seqid1 > seqid2 && (seqid1 - seqid2) >= 0x7fffffff)
		return (1);
	if (seqid1 <= seqid2)
		return (1);
	return (0);
}
static int nfscl_seq ( uint32_t seqid1 , uint32_t seqid2 ) { if ( seqid2 > seqid1 && ( seqid2 - seqid1 ) >= 0x7fffffff ) return ( 0 ) ; if ( seqid1 > seqid2 && ( seqid1 - seqid2 ) >= 0x7fffffff ) return ( 1 ) ; if ( seqid1 <= seqid2 ) return ( 1 ) ; return ( 0 ) ; }
Compare the two seqids for ordering.
Compare the two seqids for ordering .
/* seqid2 has wrapped around. */ /* seqid1 has wrapped around. */