Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Aug 2020 15:27:32 +0000 (UTC)
From:      Emmanuel Vadot <manu@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r363843 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <202008041527.074FRW6d043907@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: manu
Date: Tue Aug  4 15:27:32 2020
New Revision: 363843
URL: https://svnweb.freebsd.org/changeset/base/363843

Log:
  linuxkpi: Add time_after32 and time_before32
  
  This compare two 32 bits times
  
  Sponsored by: The FreeBSD Foundation
  Reviewed by:	kib, hselasky
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D25700

Modified:
  head/sys/compat/linuxkpi/common/include/linux/jiffies.h

Modified: head/sys/compat/linuxkpi/common/include/linux/jiffies.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/jiffies.h	Tue Aug  4 15:25:22 2020	(r363842)
+++ head/sys/compat/linuxkpi/common/include/linux/jiffies.h	Tue Aug  4 15:27:32 2020	(r363843)
@@ -45,7 +45,9 @@
 #define	MAX_JIFFY_OFFSET	((INT_MAX >> 1) - 1)
 
 #define	time_after(a, b)	((int)((b) - (a)) < 0)
+#define	time_after32(a, b)	((int32_t)((uint32_t)(b) - (uint32_t)(a)) < 0)
 #define	time_before(a, b)	time_after(b,a)
+#define	time_before32(a, b)	time_after32(b, a)
 #define	time_after_eq(a, b)	((int)((a) - (b)) >= 0)
 #define	time_before_eq(a, b)	time_after_eq(b, a)
 #define	time_in_range(a,b,c)	\



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202008041527.074FRW6d043907>