aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2023-05-16 21:02:03 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2023-06-26 09:25:47 +0000
commit0dd2a3b488f00df7871288fa6b85b304a7a40fc5 (patch)
tree8c757dabed7b8379413fd4c64a5af980a9a8f457
parent6faade07b16bfb0bfbe5ee02595a0705a797274d (diff)
downloadsrc-0dd2a3b488f00df7871288fa6b85b304a7a40fc5.tar.gz
src-0dd2a3b488f00df7871288fa6b85b304a7a40fc5.zip
LinuxKPI: implement timer_{delete,shutdown}_sync()
Implement timer_{delete,shutdown}_sync(), which do not seem to require anything additional to the already existing del_timer_sync(). Sponsored by: The FreeBSD Foundation Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D40124 (cherry picked from commit 2e07e885d65973f13d6111f7e0fcfb848a68082e)
-rw-r--r--sys/compat/linuxkpi/common/include/linux/timer.h2
-rw-r--r--sys/compat/linuxkpi/common/src/linux_compat.c14
2 files changed, 16 insertions, 0 deletions
diff --git a/sys/compat/linuxkpi/common/include/linux/timer.h b/sys/compat/linuxkpi/common/include/linux/timer.h
index 3432bfc46c4f..7b2f589a3047 100644
--- a/sys/compat/linuxkpi/common/include/linux/timer.h
+++ b/sys/compat/linuxkpi/common/include/linux/timer.h
@@ -83,6 +83,8 @@ extern void add_timer(struct timer_list *);
extern void add_timer_on(struct timer_list *, int cpu);
extern int del_timer(struct timer_list *);
extern int del_timer_sync(struct timer_list *);
+extern int timer_delete_sync(struct timer_list *);
+extern int timer_shutdown_sync(struct timer_list *);
#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 dce3cdcc2de3..a1bf711a421e 100644
--- a/sys/compat/linuxkpi/common/src/linux_compat.c
+++ b/sys/compat/linuxkpi/common/src/linux_compat.c
@@ -2148,6 +2148,20 @@ del_timer_sync(struct timer_list *timer)
return (1);
}
+int
+timer_delete_sync(struct timer_list *timer)
+{
+
+ return (del_timer_sync(timer));
+}
+
+int
+timer_shutdown_sync(struct timer_list *timer)
+{
+
+ return (del_timer_sync(timer));
+}
+
/* greatest common divisor, Euclid equation */
static uint64_t
lkpi_gcd_64(uint64_t a, uint64_t b)