xref: /freebsd/sys/contrib/openzfs/config/kernel-timer.m4 (revision b1c1ee4429fcca8f69873a8be66184e68e1b19d7)
1*b1c1ee44SMartin Matuskadnl #
2*b1c1ee44SMartin Matuskadnl # 6.2: timer_delete_sync introduced, del_timer_sync deprecated and made
3*b1c1ee44SMartin Matuskadnl #      into a simple wrapper
4*b1c1ee44SMartin Matuskadnl # 6.15: del_timer_sync removed
5*b1c1ee44SMartin Matuskadnl #
6*b1c1ee44SMartin MatuskaAC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_DELETE_SYNC], [
7*b1c1ee44SMartin Matuska	ZFS_LINUX_TEST_SRC([timer_delete_sync], [
8*b1c1ee44SMartin Matuska		#include <linux/timer.h>
9*b1c1ee44SMartin Matuska	],[
10*b1c1ee44SMartin Matuska		struct timer_list *timer __attribute__((unused)) = NULL;
11*b1c1ee44SMartin Matuska		timer_delete_sync(timer);
12*b1c1ee44SMartin Matuska	])
13*b1c1ee44SMartin Matuska])
14*b1c1ee44SMartin Matuska
15*b1c1ee44SMartin MatuskaAC_DEFUN([ZFS_AC_KERNEL_TIMER_DELETE_SYNC], [
16*b1c1ee44SMartin Matuska	AC_MSG_CHECKING([whether timer_delete_sync() is available])
17*b1c1ee44SMartin Matuska	ZFS_LINUX_TEST_RESULT([timer_delete_sync], [
18*b1c1ee44SMartin Matuska		AC_MSG_RESULT(yes)
19*b1c1ee44SMartin Matuska		AC_DEFINE(HAVE_TIMER_DELETE_SYNC, 1,
20*b1c1ee44SMartin Matuska		    [timer_delete_sync is available])
21*b1c1ee44SMartin Matuska	],[
22*b1c1ee44SMartin Matuska		AC_MSG_RESULT(no)
23*b1c1ee44SMartin Matuska	])
24*b1c1ee44SMartin Matuska])
25*b1c1ee44SMartin Matuska
26*b1c1ee44SMartin MatuskaAC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER], [
27*b1c1ee44SMartin Matuska	ZFS_AC_KERNEL_SRC_TIMER_DELETE_SYNC
28*b1c1ee44SMartin Matuska])
29*b1c1ee44SMartin Matuska
30*b1c1ee44SMartin MatuskaAC_DEFUN([ZFS_AC_KERNEL_TIMER], [
31*b1c1ee44SMartin Matuska	ZFS_AC_KERNEL_TIMER_DELETE_SYNC
32*b1c1ee44SMartin Matuska])
33