aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Quigley <[email protected]>2016-05-06 12:35:52 -0400
committerBrian Behlendorf <[email protected]>2016-05-06 09:35:52 -0700
commitae6d0c601eb863f8275bf4ec841fbebf774c3d65 (patch)
tree0f6b6e0d17d8f6cd0f2b9a674170547a16a084ec /lib
parent4b2a3e0c9d6bcdec1fd279e9bb3b7c4628cd7ba6 (diff)
OpenZFS 6672 - arc_reclaim_thread() should use gethrtime()
6672 arc_reclaim_thread() should use gethrtime() instead of ddi_get_lbolt() Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Prakash Surya <[email protected]> Reviewed by: Josef 'Jeff' Sipek <[email protected]> Reviewed by: Robert Mustacchi <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: David Quigley <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6672 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/571be5c Closes #4600
Diffstat (limited to 'lib')
-rw-r--r--lib/libspl/include/sys/time.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/libspl/include/sys/time.h b/lib/libspl/include/sys/time.h
index 03da3f7e3..f05fcaa1c 100644
--- a/lib/libspl/include/sys/time.h
+++ b/lib/libspl/include/sys/time.h
@@ -58,6 +58,15 @@
#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
#endif
+#ifndef NSEC2SEC
+#define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
+#endif
+
+#ifndef SEC2NSEC
+#define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC))
+#endif
+
+
typedef long long hrtime_t;
typedef struct timespec timestruc_t;
typedef struct timespec timespec_t;