diff options
author | Brian Behlendorf <[email protected]> | 2009-05-20 10:56:13 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-05-20 11:00:39 -0700 |
commit | 6c9433c150ad12d01f7ea4cfc72c8647a08ac5fc (patch) | |
tree | 974117fb5da01c2db1a8cee99a94e1cc59fdaa8a /config | |
parent | 96dded38442684319305082aa2ac7e25f7f414da (diff) |
SLES10 Fixes (part 3):
- Configure check for mutex_lock_nested(). This function was introduced
as part of the mutex validator in 2.6.18, but if it's unavailable then
it's safe to fallback to a plain mutex_lock().
Diffstat (limited to 'config')
-rw-r--r-- | config/spl-build.m4 | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/config/spl-build.m4 b/config/spl-build.m4 index ebc2721f5..0f849950e 100644 --- a/config/spl-build.m4 +++ b/config/spl-build.m4 @@ -706,6 +706,29 @@ AC_DEFUN([SPL_AC_INODE_I_MUTEX], [ ]) dnl # +dnl # 2.6.18 API change, +dnl # First introduced 'mutex_lock_nested()' in include/linux/mutex.h, +dnl # as part of the mutex validator. Fallback to using 'mutex_lock()' +dnl # if the mutex validator is disabled or otherwise unavailable. +dnl # +AC_DEFUN([SPL_AC_MUTEX_LOCK_NESTED], [ + AC_MSG_CHECKING([whether mutex_lock_nested() is available]) + SPL_LINUX_TRY_COMPILE([ + #include <linux/mutex.h> + ],[ + struct mutex mutex; + mutex_init(&mutex); + mutex_lock_nested(&mutex, 0); + ],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_MUTEX_LOCK_NESTED, 1, + [mutex_lock_nested() is available]) + ],[ + AC_MSG_RESULT(no) + ]) +]) + +dnl # dnl # 2.6.22 API change, dnl # First introduced 'div64_64()' in lib/div64.c dnl |