Date: Tue, 14 May 2019 23:12:14 +0000 (UTC) From: Johannes Lundberg <johalun@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r347592 - in head/sys/compat/linuxkpi/common: include/linux src Message-ID: <201905142312.x4ENCEic058410@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: johalun Date: Tue May 14 23:12:14 2019 New Revision: 347592 URL: https://svnweb.freebsd.org/changeset/base/347592 Log: LinuxKPI: Let del_timer return a value to match Linux. This patch is part of https://reviews.freebsd.org/D19565. Reviewed by: hps Approved by: imp (mentor), hps MFC after: 1 week Modified: head/sys/compat/linuxkpi/common/include/linux/timer.h head/sys/compat/linuxkpi/common/src/linux_compat.c Modified: head/sys/compat/linuxkpi/common/include/linux/timer.h ============================================================================== --- head/sys/compat/linuxkpi/common/include/linux/timer.h Tue May 14 23:10:21 2019 (r347591) +++ head/sys/compat/linuxkpi/common/include/linux/timer.h Tue May 14 23:12:14 2019 (r347592) @@ -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) \ Modified: head/sys/compat/linuxkpi/common/src/linux_compat.c ============================================================================== --- head/sys/compat/linuxkpi/common/src/linux_compat.c Tue May 14 23:10:21 2019 (r347591) +++ head/sys/compat/linuxkpi/common/src/linux_compat.c Tue May 14 23:12:14 2019 (r347592) @@ -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) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201905142312.x4ENCEic058410>