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 linux: Fix return value ...
details: https://anonhg.NetBSD.org/src/rev/42842ad4c60e
branches: trunk
changeset: 1028789:42842ad4c60e
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 12:01:57 2021 +0000
description:
linux: Fix return value of del_timer_sync.
diffstat:
sys/external/bsd/drm2/include/linux/timer.h | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r f6f87a7373b5 -r 42842ad4c60e sys/external/bsd/drm2/include/linux/timer.h
--- a/sys/external/bsd/drm2/include/linux/timer.h Sun Dec 19 12:01:48 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/timer.h Sun Dec 19 12:01:57 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.h,v 1.14 2021/12/19 11:55:47 riastradh Exp $ */
+/* $NetBSD: timer.h,v 1.15 2021/12/19 12:01:57 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -83,12 +83,18 @@
callout_stop(&timer->tl_callout);
}
-static inline bool
+static inline int
del_timer_sync(struct timer_list *timer)
{
- /* XXX return values? */
- return callout_halt(&timer->tl_callout, NULL);
+ /*
+ * Linux: `The function returns whether it has deactivated a
+ * pending timer or not.'
+ *
+ * NetBSD: `[callout_halt] will return a non-zero value if the
+ * callout was EXPIRED.', meaning it is no longer pending.
+ */
+ return !callout_halt(&timer->tl_callout, NULL);
}
static inline bool
Home |
Main Index |
Thread Index |
Old Index