aboutsummaryrefslogtreecommitdiff
path: root/sys/compat/linuxkpi
diff options
context:
space:
mode:
authorJohannes Lundberg <johalun@FreeBSD.org>2019-05-14 23:12:14 +0000
committerJohannes Lundberg <johalun@FreeBSD.org>2019-05-14 23:12:14 +0000
commit02927c768a68430a2b9ab49115a66e9b62e56be0 (patch)
tree4aaa6845450978df5ec09e176fa125d880be1913 /sys/compat/linuxkpi
parent711d44ee5644d5bd4e57b6e27d0e20421fff4632 (diff)
Notes
Diffstat (limited to 'sys/compat/linuxkpi')
-rw-r--r--sys/compat/linuxkpi/common/include/linux/timer.h2
-rw-r--r--sys/compat/linuxkpi/common/src/linux_compat.c9
2 files changed, 10 insertions, 1 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/timer.h b/sys/compat/linuxkpi/common/include/linux/timer.h
index 87a4f1a6d0a6..e8f8dbad6c9c 100644
--- a/sys/compat/linuxkpi/common/include/linux/timer.h
+++ b/sys/compat/linuxkpi/common/include/linux/timer.h
@@ -81,8 +81,8 @@ extern unsigned long linux_timer_hz_mask;
extern void mod_timer(struct timer_list *, int);
extern void add_timer(struct timer_list *);
extern void add_timer_on(struct timer_list *, int cpu);
+extern int del_timer(struct timer_list *);
-#define del_timer(timer) (void)callout_stop(&(timer)->callout)
#define del_timer_sync(timer) (void)callout_drain(&(timer)->callout)
#define timer_pending(timer) callout_pending(&(timer)->callout)
#define round_jiffies(j) \
diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c
index 0607b61362dc..291318747e1e 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -1906,6 +1906,15 @@ add_timer_on(struct timer_list *timer, int cpu)
&linux_timer_callback_wrapper, timer, cpu);
}
+int
+del_timer(struct timer_list *timer)
+{
+
+ if (callout_stop(&(timer)->callout) == -1)
+ return (0);
+ return (1);
+}
+
static void
linux_timer_init(void *arg)
{