]>
Commit | Line | Data |
---|---|---|
48ef8ba0 BB |
1 | dnl # |
2 | dnl # 3.16 API Change | |
3 | dnl # | |
4 | dnl # rwsem-spinlock "->activity" changed to "->count" | |
5 | dnl # | |
608f8749 BB |
6 | AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM_ACTIVITY], [ |
7 | ZFS_LINUX_TEST_SRC([rwsem_activity], [ | |
48ef8ba0 BB |
8 | #include <linux/rwsem.h> |
9 | ],[ | |
10 | struct rw_semaphore dummy_semaphore __attribute__ ((unused)); | |
11 | dummy_semaphore.activity = 0; | |
608f8749 BB |
12 | ]) |
13 | ]) | |
14 | ||
15 | AC_DEFUN([ZFS_AC_KERNEL_RWSEM_ACTIVITY], [ | |
16 | AC_MSG_CHECKING([whether struct rw_semaphore has member activity]) | |
17 | ZFS_LINUX_TEST_RESULT([rwsem_activity], [ | |
48ef8ba0 BB |
18 | AC_MSG_RESULT(yes) |
19 | AC_DEFINE(HAVE_RWSEM_ACTIVITY, 1, | |
608f8749 | 20 | [struct rw_semaphore has member activity]) |
48ef8ba0 BB |
21 | ],[ |
22 | AC_MSG_RESULT(no) | |
23 | ]) | |
48ef8ba0 BB |
24 | ]) |
25 | ||
26 | dnl # | |
27 | dnl # 4.8 API Change | |
28 | dnl # | |
29 | dnl # rwsem "->count" changed to atomic_long_t type | |
30 | dnl # | |
608f8749 BB |
31 | AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM_ATOMIC_LONG_COUNT], [ |
32 | ZFS_LINUX_TEST_SRC([rwsem_atomic_long_count], [ | |
48ef8ba0 BB |
33 | #include <linux/rwsem.h> |
34 | ],[ | |
35 | DECLARE_RWSEM(dummy_semaphore); | |
36 | (void) atomic_long_read(&dummy_semaphore.count); | |
608f8749 BB |
37 | ]) |
38 | ]) | |
39 | ||
40 | AC_DEFUN([ZFS_AC_KERNEL_RWSEM_ATOMIC_LONG_COUNT], [ | |
41 | AC_MSG_CHECKING( | |
42 | [whether struct rw_semaphore has atomic_long_t member count]) | |
43 | ZFS_LINUX_TEST_RESULT([rwsem_atomic_long_count], [ | |
48ef8ba0 BB |
44 | AC_MSG_RESULT(yes) |
45 | AC_DEFINE(HAVE_RWSEM_ATOMIC_LONG_COUNT, 1, | |
608f8749 | 46 | [struct rw_semaphore has atomic_long_t member count]) |
48ef8ba0 BB |
47 | ],[ |
48 | AC_MSG_RESULT(no) | |
49 | ]) | |
608f8749 BB |
50 | ]) |
51 | ||
52 | AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM], [ | |
608f8749 BB |
53 | ZFS_AC_KERNEL_SRC_RWSEM_ACTIVITY |
54 | ZFS_AC_KERNEL_SRC_RWSEM_ATOMIC_LONG_COUNT | |
55 | ]) | |
56 | ||
57 | AC_DEFUN([ZFS_AC_KERNEL_RWSEM], [ | |
608f8749 BB |
58 | ZFS_AC_KERNEL_RWSEM_ACTIVITY |
59 | ZFS_AC_KERNEL_RWSEM_ATOMIC_LONG_COUNT | |
48ef8ba0 | 60 | ]) |