Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/riastradh-drm2]: src/sys/external/bsd/drm2/include/linux Fix mod_timer t...
details: https://anonhg.NetBSD.org/src/rev/c467ba75dd35
branches: riastradh-drm2
changeset: 788155:c467ba75dd35
user: riastradh <riastradh%NetBSD.org@localhost>
date: Wed Jul 24 02:28:50 2013 +0000
description:
Fix mod_timer to use absolute timeouts in <linux/timer.h>.
diffstat:
sys/external/bsd/drm2/include/linux/timer.h | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diffs (32 lines):
diff -r 30d8827589cf -r c467ba75dd35 sys/external/bsd/drm2/include/linux/timer.h
--- a/sys/external/bsd/drm2/include/linux/timer.h Wed Jul 24 02:28:36 2013 +0000
+++ b/sys/external/bsd/drm2/include/linux/timer.h Wed Jul 24 02:28:50 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.h,v 1.1.2.1 2013/07/24 01:54:04 riastradh Exp $ */
+/* $NetBSD: timer.h,v 1.1.2.2 2013/07/24 02:28:50 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -34,6 +34,8 @@
#include <sys/callout.h>
+#include <linux/jiffies.h>
+
struct timer_list {
struct callout tl_callout;
};
@@ -51,9 +53,11 @@
}
static inline void
-mod_timer(struct timer_list *timer, unsigned long ticks)
+mod_timer(struct timer_list *timer, unsigned long then)
{
- callout_schedule(&timer->tl_callout, ticks);
+ const unsigned long now = jiffies;
+
+ callout_schedule(&timer->tl_callout, (now < then? (then - now) : 0));
}
static inline void
Home |
Main Index |
Thread Index |
Old Index