Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 May 2019 02:31:34 +0000 (UTC)
From:      Johannes Lundberg <johalun@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org
Subject:   svn commit: r348033 - in stable/12/sys/compat/linuxkpi/common: include/linux src
Message-ID:  <201905210231.x4L2VYEl046841@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: johalun
Date: Tue May 21 02:31:34 2019
New Revision: 348033
URL: https://svnweb.freebsd.org/changeset/base/348033

Log:
  MFC r347592:
  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

Modified:
  stable/12/sys/compat/linuxkpi/common/include/linux/timer.h
  stable/12/sys/compat/linuxkpi/common/src/linux_compat.c
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/sys/compat/linuxkpi/common/include/linux/timer.h
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/include/linux/timer.h	Tue May 21 02:30:43 2019	(r348032)
+++ stable/12/sys/compat/linuxkpi/common/include/linux/timer.h	Tue May 21 02:31:34 2019	(r348033)
@@ -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: stable/12/sys/compat/linuxkpi/common/src/linux_compat.c
==============================================================================
--- stable/12/sys/compat/linuxkpi/common/src/linux_compat.c	Tue May 21 02:30:43 2019	(r348032)
+++ stable/12/sys/compat/linuxkpi/common/src/linux_compat.c	Tue May 21 02:31:34 2019	(r348033)
@@ -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?201905210231.x4L2VYEl046841>