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/dist/drm/i915 provide timer_expired
details: https://anonhg.NetBSD.org/src/rev/ceda846d5cb3
branches: trunk
changeset: 1028271:ceda846d5cb3
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 09:59:13 2021 +0000
description:
provide timer_expired
Author: Maya Rashish <maya%NetBSD.org@localhost>
diffstat:
sys/external/bsd/drm2/dist/drm/i915/i915_utils.h | 9 ++++++++-
1 files changed, 8 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r 2eddee84a591 -r ceda846d5cb3 sys/external/bsd/drm2/dist/drm/i915/i915_utils.h
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_utils.h Sun Dec 19 09:59:05 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_utils.h Sun Dec 19 09:59:13 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i915_utils.h,v 1.2 2021/12/18 23:45:28 riastradh Exp $ */
+/* $NetBSD: i915_utils.h,v 1.3 2021/12/19 09:59:13 riastradh Exp $ */
/*
* Copyright © 2016 Intel Corporation
@@ -460,10 +460,17 @@
void cancel_timer(struct timer_list *t);
void set_timer_ms(struct timer_list *t, unsigned long timeout);
+#ifdef __linux__
static inline bool timer_expired(const struct timer_list *t)
{
return READ_ONCE(t->expires) && !timer_pending(t);
}
+#else
+static inline bool timer_expired(struct timer_list *t)
+{
+ return callout_expired(&t->tl_callout);
+}
+#endif
/*
* This is a lookalike for IS_ENABLED() that takes a kconfig value,
Home |
Main Index |
Thread Index |
Old Index