From: Chas Williams Date: Mon, 22 May 2006 20:08:45 +0000 (+0000) Subject: STABLE14-more-rxglock-cleanup-20060126 X-Git-Tag: openafs-stable-1_4_1c~16 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=c4e14aea82bf453ffbfef7981da6087cbacdf3a1;p=packages%2Fo%2Fopenafs.git STABLE14-more-rxglock-cleanup-20060126 FIXES 23321 more rx glock cleanup. eval for pullup after 1.4.1 (cherry picked from commit f84de8044aab16ccaf961ba30a36929f2d1f1e50) --- diff --git a/src/afs/DOC/afs_rwlocks b/src/afs/DOC/afs_rwlocks index dacee84d9..d73bac71b 100644 --- a/src/afs/DOC/afs_rwlocks +++ b/src/afs/DOC/afs_rwlocks @@ -81,9 +81,6 @@ the dcache refcount. Many fine grained locks are used by Rx on the AIX4.1 platform. These need to be explained. -It is likely they could be used preference to the afs_rxglobal_lock on -AFS_GLOBAL_SUNLOCK platforms. - ***** GLOBAL LOCKS 98. afs_global_lock -- This lock provides a non-preemptive environment @@ -96,10 +93,6 @@ may reenter AFS such as vn_rele. data structures that need synchronization. However, much existing code is deficient in this regard (e.g. afs_getevent). -99. afs_rxglobal_lock -- This lock is obtained after the afs_global_lock -at process level but is obtained independently during packet arrival -"interrupts" and during fasttimo processing. - ***** OS LOCKS 100. The vnode lock on SunOS and SGI53 protects the its reference count. diff --git a/src/afs/FBSD/osi_machdep.h b/src/afs/FBSD/osi_machdep.h index 385b22cb5..6be21a41c 100644 --- a/src/afs/FBSD/osi_machdep.h +++ b/src/afs/FBSD/osi_machdep.h @@ -25,8 +25,6 @@ #include #endif -extern struct simplelock afs_rxglobal_lock; - /* * Time related macros */ diff --git a/src/afs/NBSD/osi_machdep.h b/src/afs/NBSD/osi_machdep.h index a1a3e3771..a0f71016c 100644 --- a/src/afs/NBSD/osi_machdep.h +++ b/src/afs/NBSD/osi_machdep.h @@ -24,7 +24,6 @@ /* #include */ #define getpid() curproc -extern struct simplelock afs_rxglobal_lock; /* * Time related macros diff --git a/src/afs/OBSD/osi_machdep.h b/src/afs/OBSD/osi_machdep.h index a72885194..538f6f5c0 100644 --- a/src/afs/OBSD/osi_machdep.h +++ b/src/afs/OBSD/osi_machdep.h @@ -23,8 +23,6 @@ #include -extern struct simplelock afs_rxglobal_lock; - #define M_AFSFID (M_TEMP-1) #define M_AFSBUFHDR (M_TEMP-2) #define M_AFSBUFFER (M_TEMP-3) diff --git a/src/afs/SOLARIS/osi_machdep.h b/src/afs/SOLARIS/osi_machdep.h index e59657802..b2731aee3 100644 --- a/src/afs/SOLARIS/osi_machdep.h +++ b/src/afs/SOLARIS/osi_machdep.h @@ -69,7 +69,6 @@ extern void *afs_osi_Alloc_NoSleep(size_t size); */ #include extern kmutex_t afs_global_lock; -extern kmutex_t afs_rxglobal_lock; #define AFS_GLOCK() mutex_enter(&afs_global_lock); #define AFS_GUNLOCK() mutex_exit(&afs_global_lock); diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c index b32f5210e..ed8f97088 100644 --- a/src/afs/afs_call.c +++ b/src/afs/afs_call.c @@ -50,7 +50,6 @@ afs_uint32 rx_bindhost; #if defined(AFS_SUN5_ENV) || defined(AFS_SGI_ENV) kmutex_t afs_global_lock; -kmutex_t afs_rxglobal_lock; #endif #if defined(AFS_SGI_ENV) && !defined(AFS_SGI64_ENV) diff --git a/src/afs/afs_osi.c b/src/afs/afs_osi.c index ae0bf5962..4fb69dad0 100644 --- a/src/afs/afs_osi.c +++ b/src/afs/afs_osi.c @@ -71,7 +71,6 @@ osi_Init(void) /* Linux initialization in osi directory. Should move the others. */ mutex_init(&afs_global_lock, "afs_global_lock", MUTEX_DEFAULT, NULL); #endif - /* afs_rxglobal_lock is initialized in rx_Init. */ #endif /* AFS_GLOBAL_SUNLOCK */ #endif /* AFS_HPUX_ENV */ diff --git a/src/rx/rx.c b/src/rx/rx.c index 504e9c7aa..2d79a1911 100644 --- a/src/rx/rx.c +++ b/src/rx/rx.c @@ -441,10 +441,6 @@ rx_InitHost(u_int host, u_int port) if (!uniprocessor) rx_sleepLock = alloc_spinlock(LAST_HELD_ORDER - 10, "rx_sleepLock"); #endif /* KERNEL && AFS_HPUX110_ENV */ -#else /* RX_ENABLE_LOCKS */ -#if defined(KERNEL) && defined(AFS_GLOBAL_SUNLOCK) && !defined(AFS_HPUX_ENV) && !defined(AFS_OBSD_ENV) - mutex_init(&afs_rxglobal_lock, "afs_rxglobal_lock", MUTEX_DEFAULT, NULL); -#endif /* AFS_GLOBAL_SUNLOCK */ #endif /* RX_ENABLE_LOCKS */ rxi_nCalls = 0;