Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux Define jiffies_to_usecs,...



details:   https://anonhg.NetBSD.org/src/rev/35e78c1eec10
branches:  trunk
changeset: 992577:35e78c1eec10
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:05:13 2018 +0000

description:
Define jiffies_to_usecs, badly.

diffstat:

 sys/external/bsd/drm2/include/linux/jiffies.h |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (24 lines):

diff -r 23fd4d8268ff -r 35e78c1eec10 sys/external/bsd/drm2/include/linux/jiffies.h
--- a/sys/external/bsd/drm2/include/linux/jiffies.h     Mon Aug 27 07:05:00 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/jiffies.h     Mon Aug 27 07:05:13 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: jiffies.h,v 1.10 2018/08/27 06:55:52 riastradh Exp $   */
+/*     $NetBSD: jiffies.h,v 1.11 2018/08/27 07:05:13 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -83,6 +83,14 @@
 }
 
 static inline unsigned int
+jiffies_to_usecs(unsigned int j)
+{
+
+       /* XXX Do better arithmetic.  */
+       return (unsigned int)((unsigned long)j*1000000/hz);
+}
+
+static inline unsigned int
 timespec_to_jiffies(const struct timespec *ts)
 {
        return tstohz(ts);



Home | Main Index | Thread Index | Old Index