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/4370f4c3e186
branches:  trunk
changeset: 834959:4370f4c3e186
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 821bd368dc88 -r 4370f4c3e186 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