xref: /freebsd/sys/contrib/openzfs/config/kernel-usleep_range.m4 (revision cfd6422a5217410fbd66f7a7a8a64d9d85e61229)
1dnl #
2dnl # 2.6.36 API compatibility- Added usleep_range timer.
3dnl #
4dnl # usleep_range is a finer precision implementation of msleep
5dnl # designed to be a drop-in replacement for udelay where a precise
6dnl # sleep / busy-wait is unnecessary.
7dnl #
8AC_DEFUN([ZFS_AC_KERNEL_SRC_USLEEP_RANGE], [
9	ZFS_LINUX_TEST_SRC([usleep_range], [
10		#include <linux/delay.h>
11	],[
12		usleep_range(0, 0);
13	])
14])
15
16AC_DEFUN([ZFS_AC_KERNEL_USLEEP_RANGE], [
17	AC_MSG_CHECKING([whether usleep_range() is available])
18	ZFS_LINUX_TEST_RESULT([usleep_range], [
19		AC_MSG_RESULT(yes)
20	],[
21		ZFS_LINUX_TEST_ERROR([usleep_range()])
22	])
23])
24