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 Update Linux timer API f...
details: https://anonhg.NetBSD.org/src/rev/87527faaf4d5
branches: trunk
changeset: 1027918:87527faaf4d5
user: riastradh <riastradh%NetBSD.org@localhost>
date: Sun Dec 19 01:16:21 2021 +0000
description:
Update Linux timer API from ulong cookie to container_of.
diffstat:
sys/external/bsd/drm2/include/linux/timer.h | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (31 lines):
diff -r 7c7de79c851d -r 87527faaf4d5 sys/external/bsd/drm2/include/linux/timer.h
--- a/sys/external/bsd/drm2/include/linux/timer.h Sun Dec 19 01:16:13 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/timer.h Sun Dec 19 01:16:21 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: timer.h,v 1.7 2019/10/13 22:32:09 christos Exp $ */
+/* $NetBSD: timer.h,v 1.8 2021/12/19 01:16:21 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -47,16 +47,18 @@
struct callout tl_callout;
};
+#define from_timer(V, T, F) container_of(T, __typeof__(*(V)), F)
+
static inline void
-setup_timer(struct timer_list *timer, void (*fn)(unsigned long),
- unsigned long arg)
+timer_setup(struct timer_list *timer, void (*fn)(struct timer_list *),
+ unsigned flags)
{
callout_init(&timer->tl_callout, 0);
/* XXX Super-sketchy casts! */
callout_setfunc(&timer->tl_callout, (void (*)(void *))(void *)fn,
- (void *)(uintptr_t)arg);
+ (void *)arg);
}
static inline void
Home |
Main Index |
Thread Index |
Old Index