summaryrefslogtreecommitdiffstats
path: root/sys/cddl/compat/opensolaris/sys/time.h
diff options
context:
space:
mode:
Diffstat (limited to 'sys/cddl/compat/opensolaris/sys/time.h')
-rw-r--r--sys/cddl/compat/opensolaris/sys/time.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/sys/cddl/compat/opensolaris/sys/time.h b/sys/cddl/compat/opensolaris/sys/time.h
index 4275790..05db50e 100644
--- a/sys/cddl/compat/opensolaris/sys/time.h
+++ b/sys/cddl/compat/opensolaris/sys/time.h
@@ -38,8 +38,6 @@
typedef longlong_t hrtime_t;
-#define LBOLT ((gethrtime() * hz) / NANOSEC)
-
#if defined(__i386__) || defined(__powerpc__)
#define TIMESPEC_OVERFLOW(ts) \
((ts)->tv_sec < INT32_MIN || (ts)->tv_sec > INT32_MAX)
@@ -49,25 +47,23 @@ typedef longlong_t hrtime_t;
#endif
#ifdef _KERNEL
-#define lbolt64 (int64_t)(LBOLT)
-
static __inline hrtime_t
gethrtime(void) {
struct timespec ts;
hrtime_t nsec;
-#if 1
getnanouptime(&ts);
-#else
- nanouptime(&ts);
-#endif
nsec = (hrtime_t)ts.tv_sec * NANOSEC + ts.tv_nsec;
return (nsec);
}
#define gethrestime_sec() (time_second)
#define gethrestime(ts) getnanotime(ts)
+#define gethrtime_waitfree() gethrtime()
+
+#define ddi_get_lbolt() ((gethrtime() * hz) / NANOSEC)
+#define ddi_get_lbolt64() (int64_t)((gethrtime() * hz) / NANOSEC)
#else
@@ -77,7 +73,6 @@ static __inline hrtime_t gethrtime(void) {
return (((u_int64_t) ts.tv_sec) * NANOSEC + ts.tv_nsec);
}
-
#endif /* _KERNEL */
#endif /* !_OPENSOLARIS_SYS_TIME_H_ */
OpenPOWER on IntegriCloud