4 dnl # rwsem-spinlock "->activity" changed to "->count"
6 AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM_ACTIVITY], [
7 ZFS_LINUX_TEST_SRC([rwsem_activity], [
8 #include <linux/rwsem.h>
10 struct rw_semaphore dummy_semaphore __attribute__ ((unused));
11 dummy_semaphore.activity = 0;
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], [
19 AC_DEFINE(HAVE_RWSEM_ACTIVITY, 1,
20 [struct rw_semaphore has member activity])
29 dnl # rwsem "->count" changed to atomic_long_t type
31 AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM_ATOMIC_LONG_COUNT], [
32 ZFS_LINUX_TEST_SRC([rwsem_atomic_long_count], [
33 #include <linux/rwsem.h>
35 DECLARE_RWSEM(dummy_semaphore);
36 (void) atomic_long_read(&dummy_semaphore.count);
40 AC_DEFUN([ZFS_AC_KERNEL_RWSEM_ATOMIC_LONG_COUNT], [
42 [whether struct rw_semaphore has atomic_long_t member count])
43 ZFS_LINUX_TEST_RESULT([rwsem_atomic_long_count], [
45 AC_DEFINE(HAVE_RWSEM_ATOMIC_LONG_COUNT, 1,
46 [struct rw_semaphore has atomic_long_t member count])
52 AC_DEFUN([ZFS_AC_KERNEL_SRC_RWSEM], [
53 ZFS_AC_KERNEL_SRC_RWSEM_ACTIVITY
54 ZFS_AC_KERNEL_SRC_RWSEM_ATOMIC_LONG_COUNT
57 AC_DEFUN([ZFS_AC_KERNEL_RWSEM], [
58 ZFS_AC_KERNEL_RWSEM_ACTIVITY
59 ZFS_AC_KERNEL_RWSEM_ATOMIC_LONG_COUNT