]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - config/kernel-urange-sleep.m4
Revert "Develop tests for issues #5866 and #8858"
[FreeBSD/FreeBSD.git] / config / kernel-urange-sleep.m4
1 dnl #
2 dnl # 2.6.36 API compatibility.
3 dnl # Added usleep_range timer.
4 dnl # usleep_range is a finer precision implementation of msleep
5 dnl # designed to be a drop-in replacement for udelay where a precise
6 dnl # sleep / busy-wait is unnecessary.
7 dnl #
8 AC_DEFUN([ZFS_AC_KERNEL_USLEEP_RANGE], [
9         AC_MSG_CHECKING([whether usleep_range() is available])
10         ZFS_LINUX_TRY_COMPILE([
11                 #include <linux/delay.h>
12         ],[
13                 usleep_range(0, 0);
14         ],[
15                 AC_MSG_RESULT(yes)
16                 AC_DEFINE(HAVE_USLEEP_RANGE, 1,
17                           [usleep_range is available])
18         ],[
19                 AC_MSG_RESULT(no)
20         ])
21 ])