Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Jan 2014 19:07:42 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r260328 - head/sys/cddl/compat/opensolaris/sys
Message-ID:  <201401051907.s05J7gGW030183@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sun Jan  5 19:07:42 2014
New Revision: 260328
URL: http://svnweb.freebsd.org/changeset/base/260328

Log:
  Fix build after r260234 by converting ddi_get_lbolt64() from inline into
  a macro.  Otherwise compiler complains that hz variable used there either
  undefined or defined twice, thanks to header mess caused by compat shims.

Modified:
  head/sys/cddl/compat/opensolaris/sys/time.h

Modified: head/sys/cddl/compat/opensolaris/sys/time.h
==============================================================================
--- head/sys/cddl/compat/opensolaris/sys/time.h	Sun Jan  5 18:46:58 2014	(r260327)
+++ head/sys/cddl/compat/opensolaris/sys/time.h	Sun Jan  5 19:07:42 2014	(r260328)
@@ -70,21 +70,10 @@ gethrtime(void) {
 #define	gethrtime_waitfree()	gethrtime()
 
 extern int nsec_per_tick;	/* nanoseconds per clock tick */
-extern int hz;			/* clock ticks per second */
 
-static __inline int64_t
-ddi_get_lbolt64(void)
-{
-
-	return (((getsbinuptime() >> 16) * hz) >> 16);
-}
-
-static __inline clock_t
-ddi_get_lbolt(void)
-{
-
-	return (ddi_get_lbolt64());
-}
+#define ddi_get_lbolt64()				\
+    (int64_t)(((getsbinuptime() >> 16) * hz) >> 16)
+#define ddi_get_lbolt()		(clock_t)ddi_get_lbolt64()
 
 #else
 



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