From: Jason McCormick Date: Sat, 12 Aug 2006 17:50:37 +0000 (+0000) Subject: linux-mutex-changes-20060812 X-Git-Tag: BP-openafs-windows-kdfs-ifs~1101 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=ba05854b63e969abc6fd85644e5146d9d110c1d0;p=packages%2Fo%2Fopenafs.git linux-mutex-changes-20060812 update mutex declarations --- diff --git a/src/afs/LINUX/osi_alloc.c b/src/afs/LINUX/osi_alloc.c index 23994d07b..24dd1f77a 100644 --- a/src/afs/LINUX/osi_alloc.c +++ b/src/afs/LINUX/osi_alloc.c @@ -282,7 +282,11 @@ get_hash_stats() /************** Linux memory allocator interface functions **********/ #if defined(AFS_LINUX24_ENV) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +DEFINE_MUTEX(afs_linux_alloc_sem); +#else DECLARE_MUTEX(afs_linux_alloc_sem); +#endif #else struct semaphore afs_linux_alloc_sem = MUTEX; #endif diff --git a/src/afs/LINUX/osi_cred.c b/src/afs/LINUX/osi_cred.c index a8f806c56..612e4f00d 100644 --- a/src/afs/LINUX/osi_cred.c +++ b/src/afs/LINUX/osi_cred.c @@ -33,7 +33,11 @@ int ncreds_inuse = 0; * test if no creds in pool before grabbing lock in crfree(). */ #if defined(AFS_LINUX24_ENV) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +static DEFINE_MUTEX(linux_cred_pool_lock); +#else static DECLARE_MUTEX(linux_cred_pool_lock); +#endif #else static struct semaphore linux_cred_pool_lock = MUTEX; #endif diff --git a/src/afs/LINUX/osi_pag_module.c b/src/afs/LINUX/osi_pag_module.c index ecfebaa3c..f02f36054 100644 --- a/src/afs/LINUX/osi_pag_module.c +++ b/src/afs/LINUX/osi_pag_module.c @@ -55,7 +55,11 @@ MODULE_PARM(this_cell, "s"); MODULE_PARM_DESC(this_cell, "Local cell name"); #if defined(AFS_LINUX24_ENV) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16) +DEFINE_MUTEX(afs_global_lock); +#else DECLARE_MUTEX(afs_global_lock); +#endif struct proc_dir_entry *openafs_procfs; #else struct semaphore afs_global_lock = MUTEX;