svn commit: r320336 - head/sys/compat/linuxkpi/common/include/linux

Mark Johnston markj at FreeBSD.org
Sun Jun 25 19:28:03 UTC 2017


Author: markj
Date: Sun Jun 25 19:28:01 2017
New Revision: 320336
URL: https://svnweb.freebsd.org/changeset/base/320336

Log:
  Add ns_to_ktime() to the LinuxKPI.
  
  MFC after:	1 week

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

Modified: head/sys/compat/linuxkpi/common/include/linux/ktime.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/ktime.h	Sun Jun 25 19:23:14 2017	(r320335)
+++ head/sys/compat/linuxkpi/common/include/linux/ktime.h	Sun Jun 25 19:28:01 2017	(r320336)
@@ -51,6 +51,15 @@ ktime_to_ns(ktime_t kt)
 	return kt.tv64;
 }
 
+static inline ktime_t
+ns_to_ktime(uint64_t nsec)
+{
+	ktime_t kt;
+
+	kt.tv64 = nsec;
+	return (kt);
+}
+
 static inline int64_t
 ktime_divns(const ktime_t kt, int64_t div)
 {


More information about the svn-src-head mailing list