Date: Sun, 25 Jun 2017 19:28:02 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r320336 - head/sys/compat/linuxkpi/common/include/linux Message-ID: <201706251928.v5PJS2JC072350@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706251928.v5PJS2JC072350>