mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 14:07:39 +00:00
STABLE14-kill-rxglock-20050413
FIXES 18222 the rxglock was being defined out by all the platforms, just kill it. (cherry picked from commit dbeab01c12fd61305b9b5cc9a61036d934db1ce8)
This commit is contained in:
parent
e3061fc6f9
commit
ae8b3d3f43
@ -69,10 +69,6 @@ extern simple_lock_data afs_global_lock;
|
|||||||
simple_unlock((void *)&afs_global_lock); \
|
simple_unlock((void *)&afs_global_lock); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#define ISAFS_GLOCK() lock_mine((void *)&afs_global_lock)
|
#define ISAFS_GLOCK() lock_mine((void *)&afs_global_lock)
|
||||||
|
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _OSI_MACHDEP_H_ */
|
#endif /* _OSI_MACHDEP_H_ */
|
||||||
|
@ -85,9 +85,6 @@ extern struct lock__bsd__ afs_global_lock;
|
|||||||
lockmgr(&afs_global_lock, LK_RELEASE, 0, current_proc()); \
|
lockmgr(&afs_global_lock, LK_RELEASE, 0, current_proc()); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#define ISAFS_GLOCK() (afs_global_owner == current_thread())
|
#define ISAFS_GLOCK() (afs_global_owner == current_thread())
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
|
|
||||||
#define SPLVAR
|
#define SPLVAR
|
||||||
#define NETPRI
|
#define NETPRI
|
||||||
|
@ -63,9 +63,6 @@ extern thread_t afs_global_owner;
|
|||||||
usimple_unlock(&afs_global_lock); \
|
usimple_unlock(&afs_global_lock); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#define ISAFS_GLOCK() (afs_global_owner == current_thread())
|
#define ISAFS_GLOCK() (afs_global_owner == current_thread())
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
|
|
||||||
#undef SPLVAR
|
#undef SPLVAR
|
||||||
#define SPLVAR
|
#define SPLVAR
|
||||||
|
@ -107,10 +107,6 @@ extern struct proc *afs_global_owner;
|
|||||||
#define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
|
#define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
|
||||||
#endif /* FBSD50 */
|
#endif /* FBSD50 */
|
||||||
|
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
|
|
||||||
#undef SPLVAR
|
#undef SPLVAR
|
||||||
#define SPLVAR int splvar
|
#define SPLVAR int splvar
|
||||||
#undef NETPRI
|
#undef NETPRI
|
||||||
|
@ -80,10 +80,6 @@ extern void afsHashRelease(tid_t key);
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
|
|
||||||
/* Uses splnet only in the SP case */
|
/* Uses splnet only in the SP case */
|
||||||
#define SPLVAR register ulong_t splvar
|
#define SPLVAR register ulong_t splvar
|
||||||
#define NETPRI NET_SPLNET(splvar)
|
#define NETPRI NET_SPLNET(splvar)
|
||||||
|
@ -172,11 +172,6 @@ extern long afs_global_owner;
|
|||||||
(AFS_ASSERT_GLOCK(), afs_global_owner = 0, mutex_exit(&afs_global_lock))
|
(AFS_ASSERT_GLOCK(), afs_global_owner = 0, mutex_exit(&afs_global_lock))
|
||||||
#define ISAFS_GLOCK() (osi_ThreadUnique() == afs_global_owner)
|
#define ISAFS_GLOCK() (osi_ThreadUnique() == afs_global_owner)
|
||||||
#endif /* AFS_SGI64_ENV */
|
#endif /* AFS_SGI64_ENV */
|
||||||
|
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
|
|
||||||
#else /* MP */
|
#else /* MP */
|
||||||
#define AFS_GLOCK()
|
#define AFS_GLOCK()
|
||||||
#define AFS_GUNLOCK()
|
#define AFS_GUNLOCK()
|
||||||
|
@ -222,10 +222,6 @@ do { \
|
|||||||
#define AFS_GUNLOCK()
|
#define AFS_GUNLOCK()
|
||||||
#define ISAFS_GLOCK() 1
|
#define ISAFS_GLOCK() 1
|
||||||
#define AFS_ASSERT_GLOCK()
|
#define AFS_ASSERT_GLOCK()
|
||||||
#define AFS_ASSERT_RXGLOCK()
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
#endif /* OSI_MACHDEP_H_ */
|
#endif /* OSI_MACHDEP_H_ */
|
||||||
|
@ -76,9 +76,6 @@ extern thread_t afs_global_owner;
|
|||||||
simple_unlock(&afs_global_lock); \
|
simple_unlock(&afs_global_lock); \
|
||||||
} while(0)
|
} while(0)
|
||||||
#endif /* 0 */
|
#endif /* 0 */
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
|
|
||||||
#undef SPLVAR
|
#undef SPLVAR
|
||||||
#define SPLVAR
|
#define SPLVAR
|
||||||
|
@ -139,9 +139,6 @@ extern struct simplelock afs_global_lock;
|
|||||||
#define AFS_ASSERT_GLOCK()
|
#define AFS_ASSERT_GLOCK()
|
||||||
#define ISAFS_GLOCK() 1
|
#define ISAFS_GLOCK() 1
|
||||||
#endif
|
#endif
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
|
|
||||||
#undef SPLVAR
|
#undef SPLVAR
|
||||||
#define SPLVAR int splvar
|
#define SPLVAR int splvar
|
||||||
|
@ -74,10 +74,6 @@ extern kmutex_t afs_rxglobal_lock;
|
|||||||
#define AFS_GLOCK() mutex_enter(&afs_global_lock);
|
#define AFS_GLOCK() mutex_enter(&afs_global_lock);
|
||||||
#define AFS_GUNLOCK() mutex_exit(&afs_global_lock);
|
#define AFS_GUNLOCK() mutex_exit(&afs_global_lock);
|
||||||
#define ISAFS_GLOCK() mutex_owned(&afs_global_lock)
|
#define ISAFS_GLOCK() mutex_owned(&afs_global_lock)
|
||||||
|
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
@ -459,16 +459,12 @@ afs_osi_Sleep(void *x)
|
|||||||
{
|
{
|
||||||
int index;
|
int index;
|
||||||
osi_wait_t *waitp;
|
osi_wait_t *waitp;
|
||||||
int rxGlockOwner = ISAFS_RXGLOCK();
|
|
||||||
int glockOwner = ISAFS_GLOCK();
|
int glockOwner = ISAFS_GLOCK();
|
||||||
|
|
||||||
usr_mutex_lock(&osi_waitq_lock);
|
usr_mutex_lock(&osi_waitq_lock);
|
||||||
if (glockOwner) {
|
if (glockOwner) {
|
||||||
AFS_GUNLOCK();
|
AFS_GUNLOCK();
|
||||||
}
|
}
|
||||||
if (rxGlockOwner) {
|
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
}
|
|
||||||
index = WAITHASH(x);
|
index = WAITHASH(x);
|
||||||
if (osi_waithash_avail == NULL) {
|
if (osi_waithash_avail == NULL) {
|
||||||
waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t));
|
waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t));
|
||||||
@ -495,9 +491,6 @@ afs_osi_Sleep(void *x)
|
|||||||
if (glockOwner) {
|
if (glockOwner) {
|
||||||
AFS_GLOCK();
|
AFS_GLOCK();
|
||||||
}
|
}
|
||||||
if (rxGlockOwner) {
|
|
||||||
AFS_RXGLOCK();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
@ -533,7 +526,6 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok)
|
|||||||
osi_wait_t *waitp;
|
osi_wait_t *waitp;
|
||||||
struct timespec tv;
|
struct timespec tv;
|
||||||
int ret;
|
int ret;
|
||||||
int rxGlockOwner = ISAFS_RXGLOCK();
|
|
||||||
int glockOwner = ISAFS_GLOCK();
|
int glockOwner = ISAFS_GLOCK();
|
||||||
|
|
||||||
tv.tv_sec = msec / 1000;
|
tv.tv_sec = msec / 1000;
|
||||||
@ -542,25 +534,16 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok)
|
|||||||
if (glockOwner) {
|
if (glockOwner) {
|
||||||
AFS_GUNLOCK();
|
AFS_GUNLOCK();
|
||||||
}
|
}
|
||||||
if (rxGlockOwner) {
|
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
}
|
|
||||||
usr_thread_sleep(&tv);
|
usr_thread_sleep(&tv);
|
||||||
ret = 0;
|
ret = 0;
|
||||||
if (glockOwner) {
|
if (glockOwner) {
|
||||||
AFS_GLOCK();
|
AFS_GLOCK();
|
||||||
}
|
}
|
||||||
if (rxGlockOwner) {
|
|
||||||
AFS_RXGLOCK();
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
usr_mutex_lock(&osi_waitq_lock);
|
usr_mutex_lock(&osi_waitq_lock);
|
||||||
if (glockOwner) {
|
if (glockOwner) {
|
||||||
AFS_GUNLOCK();
|
AFS_GUNLOCK();
|
||||||
}
|
}
|
||||||
if (rxGlockOwner) {
|
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
}
|
|
||||||
index = WAITHASH((caddr_t) handle);
|
index = WAITHASH((caddr_t) handle);
|
||||||
if (osi_waithash_avail == NULL) {
|
if (osi_waithash_avail == NULL) {
|
||||||
waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t));
|
waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t));
|
||||||
@ -593,9 +576,6 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok)
|
|||||||
if (glockOwner) {
|
if (glockOwner) {
|
||||||
AFS_GLOCK();
|
AFS_GLOCK();
|
||||||
}
|
}
|
||||||
if (rxGlockOwner) {
|
|
||||||
AFS_RXGLOCK();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -208,8 +208,6 @@ typedef struct timeval osi_timeval_t;
|
|||||||
#ifdef AFS_GLOBAL_SUNLOCK
|
#ifdef AFS_GLOBAL_SUNLOCK
|
||||||
#define AFS_ASSERT_GLOCK() \
|
#define AFS_ASSERT_GLOCK() \
|
||||||
(ISAFS_GLOCK() || (osi_Panic("afs global lock not held at %s:%d\n", __FILE__, __LINE__), 0))
|
(ISAFS_GLOCK() || (osi_Panic("afs global lock not held at %s:%d\n", __FILE__, __LINE__), 0))
|
||||||
#define AFS_ASSERT_RXGLOCK() \
|
|
||||||
(ISAFS_RXGLOCK() || (osi_Panic("rx global lock not held at %s:%d\n", __FILE__, __LINE__), 0))
|
|
||||||
#endif /* AFS_GLOBAL_SUNLOCK */
|
#endif /* AFS_GLOBAL_SUNLOCK */
|
||||||
|
|
||||||
#ifdef RX_ENABLE_LOCKS
|
#ifdef RX_ENABLE_LOCKS
|
||||||
@ -227,10 +225,6 @@ typedef struct timeval osi_timeval_t;
|
|||||||
#define AFS_GUNLOCK()
|
#define AFS_GUNLOCK()
|
||||||
#define ISAFS_GLOCK() 1
|
#define ISAFS_GLOCK() 1
|
||||||
#define AFS_ASSERT_GLOCK()
|
#define AFS_ASSERT_GLOCK()
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
#define AFS_ASSERT_RXGLOCK()
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* On an MP that uses multithreading, splnet is not sufficient to provide
|
/* On an MP that uses multithreading, splnet is not sufficient to provide
|
||||||
|
@ -59,10 +59,6 @@ typedef struct afs_bozoLock afs_bozoLock_t;
|
|||||||
|
|
||||||
#undef MObtainWriteLock /* Defined also in ../rx/rx_machdep.h" */
|
#undef MObtainWriteLock /* Defined also in ../rx/rx_machdep.h" */
|
||||||
#undef MReleaseWriteLock
|
#undef MReleaseWriteLock
|
||||||
#ifndef RXObtainWriteLock
|
|
||||||
#define RXObtainWriteLock(lock) ObtainWriteLock(lock)
|
|
||||||
#define RXReleaseWriteLock(lock) ReleaseWriteLock(lock)
|
|
||||||
#endif
|
|
||||||
#define MObtainReadLock(lock) ObtainReadLock(lock)
|
#define MObtainReadLock(lock) ObtainReadLock(lock)
|
||||||
#define MObtainWriteLock(lock,src) ObtainWriteLock(lock,src)
|
#define MObtainWriteLock(lock,src) ObtainWriteLock(lock,src)
|
||||||
#define MObtainSharedLock(lock,src) ObtainSharedLock(lock,src)
|
#define MObtainSharedLock(lock,src) ObtainSharedLock(lock,src)
|
||||||
|
@ -68,15 +68,6 @@ typedef tid_t afs_kcondvar_t;
|
|||||||
__LINE__), \
|
__LINE__), \
|
||||||
simple_unlock((void *)(a))
|
simple_unlock((void *)(a))
|
||||||
|
|
||||||
|
|
||||||
#define RXObtainWriteLock(a) simple_lock((void *)(a)), \
|
|
||||||
rxdb_grablock((void *)(a), thread_self(),rxdb_fileID,\
|
|
||||||
__LINE__)
|
|
||||||
|
|
||||||
#define RXReleaseWriteLock(a) rxdb_droplock((void *)(a), thread_self(), rxdb_fileID,\
|
|
||||||
__LINE__), \
|
|
||||||
simple_unlock((void *)(a))
|
|
||||||
|
|
||||||
#define CV_WAIT(_cv, _lck) \
|
#define CV_WAIT(_cv, _lck) \
|
||||||
do { \
|
do { \
|
||||||
int haveGlock = ISAFS_GLOCK(); \
|
int haveGlock = ISAFS_GLOCK(); \
|
||||||
@ -112,8 +103,6 @@ typedef tid_t afs_kcondvar_t;
|
|||||||
#define MUTEX_ENTER(a) simple_lock((void *)(a))
|
#define MUTEX_ENTER(a) simple_lock((void *)(a))
|
||||||
#define MUTEX_TRYENTER(a) simple_lock_try((void *)(a))
|
#define MUTEX_TRYENTER(a) simple_lock_try((void *)(a))
|
||||||
#define MUTEX_EXIT(a) simple_unlock((void *)(a))
|
#define MUTEX_EXIT(a) simple_unlock((void *)(a))
|
||||||
#define RXObtainWriteLock(a) simple_lock((void *)(a))
|
|
||||||
#define RXReleaseWriteLock(a) simple_unlock((void *)(a))
|
|
||||||
|
|
||||||
#define CV_WAIT(_cv, _lck) \
|
#define CV_WAIT(_cv, _lck) \
|
||||||
do { \
|
do { \
|
||||||
|
@ -144,7 +144,6 @@ rxk_input(struct mbuf *am, int iphlen)
|
|||||||
*/
|
*/
|
||||||
data_len = ntohs(tu->uh_ulen);
|
data_len = ntohs(tu->uh_ulen);
|
||||||
data_len -= 8;
|
data_len -= 8;
|
||||||
AFS_RXGLOCK();
|
|
||||||
if (!(*rxk_GetPacketProc) (&phandle, data_len)) {
|
if (!(*rxk_GetPacketProc) (&phandle, data_len)) {
|
||||||
if (rx_mb_to_packet(am, m_freem, 28, data_len, phandle)) {
|
if (rx_mb_to_packet(am, m_freem, 28, data_len, phandle)) {
|
||||||
/* XXX should just increment counter here.. */
|
/* XXX should just increment counter here.. */
|
||||||
@ -155,7 +154,6 @@ rxk_input(struct mbuf *am, int iphlen)
|
|||||||
rxk_portRocks[i], data_len);
|
rxk_portRocks[i], data_len);
|
||||||
} else
|
} else
|
||||||
m_freem(am);
|
m_freem(am);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,6 @@ rxk_input(struct mbuf *am, int iphlen)
|
|||||||
*/
|
*/
|
||||||
data_len = ntohs(tu->uh_ulen);
|
data_len = ntohs(tu->uh_ulen);
|
||||||
data_len -= 8;
|
data_len -= 8;
|
||||||
AFS_RXGLOCK();
|
|
||||||
if (!(*rxk_GetPacketProc) (&phandle, data_len)) {
|
if (!(*rxk_GetPacketProc) (&phandle, data_len)) {
|
||||||
if (rx_mb_to_packet(am, m_freem, 28, data_len, phandle)) {
|
if (rx_mb_to_packet(am, m_freem, 28, data_len, phandle)) {
|
||||||
/* XXX should just increment counter here.. */
|
/* XXX should just increment counter here.. */
|
||||||
@ -294,7 +293,6 @@ rxk_input(struct mbuf *am, int iphlen)
|
|||||||
rxk_portRocks[i], data_len);
|
rxk_portRocks[i], data_len);
|
||||||
} else
|
} else
|
||||||
m_freem(am);
|
m_freem(am);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -132,10 +132,6 @@ typedef caddr_t afs_kcondvar_t;
|
|||||||
|
|
||||||
#ifdef AFS_HPUX102_ENV
|
#ifdef AFS_HPUX102_ENV
|
||||||
|
|
||||||
#define RXObtainWriteLock(a) AFS_ASSERT_RXGLOCK()
|
|
||||||
#define RXReleaseWriteLock(a)
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(AFS_HPUX110_ENV)
|
#if defined(AFS_HPUX110_ENV)
|
||||||
#undef osirx_AssertMine
|
#undef osirx_AssertMine
|
||||||
extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg);
|
extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg);
|
||||||
|
@ -21,9 +21,6 @@
|
|||||||
/* You can't have AFS_GLOBAL_SUNLOCK and not RX_ENABLE_LOCKS */
|
/* You can't have AFS_GLOBAL_SUNLOCK and not RX_ENABLE_LOCKS */
|
||||||
#define RX_ENABLE_LOCKS 1
|
#define RX_ENABLE_LOCKS 1
|
||||||
#define AFS_GLOBAL_RXLOCK_KERNEL
|
#define AFS_GLOBAL_RXLOCK_KERNEL
|
||||||
#ifndef AFS_GLOBAL_SUNLOCK
|
|
||||||
#define AFS_ASSERT_RXGLOCK()
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* This is incomplete and probably wouldn't work with NCPUS > 1 */
|
/* This is incomplete and probably wouldn't work with NCPUS > 1 */
|
||||||
|
|
||||||
|
@ -49,11 +49,6 @@
|
|||||||
extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg);
|
extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#define ISAFS_RXGLOCK() 1
|
|
||||||
#define AFS_ASSERT_RXGLOCK()
|
|
||||||
|
|
||||||
#define SPLVAR
|
#define SPLVAR
|
||||||
#define NETPRI
|
#define NETPRI
|
||||||
#define USERPRI
|
#define USERPRI
|
||||||
|
28
src/rx/rx.c
28
src/rx/rx.c
@ -468,7 +468,6 @@ rx_InitHost(u_int host, u_int port)
|
|||||||
rx_CheckPackets();
|
rx_CheckPackets();
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
|
|
||||||
clock_Init();
|
clock_Init();
|
||||||
|
|
||||||
@ -534,7 +533,6 @@ rx_InitHost(u_int host, u_int port)
|
|||||||
* implementation environment--kernel or user space) */
|
* implementation environment--kernel or user space) */
|
||||||
rxi_StartListener();
|
rxi_StartListener();
|
||||||
|
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
tmp_status = rxinit_status = 0;
|
tmp_status = rxinit_status = 0;
|
||||||
UNLOCK_RX_INIT;
|
UNLOCK_RX_INIT;
|
||||||
@ -667,7 +665,6 @@ rx_StartServer(int donateMe)
|
|||||||
clock_NewTime();
|
clock_NewTime();
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
/* Start server processes, if necessary (exact function is dependent
|
/* Start server processes, if necessary (exact function is dependent
|
||||||
* on the implementation environment--kernel or user space). DonateMe
|
* on the implementation environment--kernel or user space). DonateMe
|
||||||
* will be 1 if there is 1 pre-existing proc, i.e. this one. In this
|
* will be 1 if there is 1 pre-existing proc, i.e. this one. In this
|
||||||
@ -694,7 +691,6 @@ rx_StartServer(int donateMe)
|
|||||||
/* Turn on reaping of idle server connections */
|
/* Turn on reaping of idle server connections */
|
||||||
rxi_ReapConnections();
|
rxi_ReapConnections();
|
||||||
|
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
|
|
||||||
if (donateMe) {
|
if (donateMe) {
|
||||||
@ -746,7 +742,6 @@ rx_NewConnection(register afs_uint32 shost, u_short sport, u_short sservice,
|
|||||||
CV_INIT(&conn->conn_call_cv, "conn call cv", CV_DEFAULT, 0);
|
CV_INIT(&conn->conn_call_cv, "conn call cv", CV_DEFAULT, 0);
|
||||||
#endif
|
#endif
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&rx_connHashTable_lock);
|
MUTEX_ENTER(&rx_connHashTable_lock);
|
||||||
cid = (rx_nextCid += RX_MAXCALLS);
|
cid = (rx_nextCid += RX_MAXCALLS);
|
||||||
conn->type = RX_CLIENT_CONNECTION;
|
conn->type = RX_CLIENT_CONNECTION;
|
||||||
@ -780,7 +775,6 @@ rx_NewConnection(register afs_uint32 shost, u_short sport, u_short sservice,
|
|||||||
MUTEX_EXIT(&rx_stats_mutex);
|
MUTEX_EXIT(&rx_stats_mutex);
|
||||||
|
|
||||||
MUTEX_EXIT(&rx_connHashTable_lock);
|
MUTEX_EXIT(&rx_connHashTable_lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return conn;
|
return conn;
|
||||||
}
|
}
|
||||||
@ -1010,9 +1004,7 @@ rx_DestroyConnection(register struct rx_connection *conn)
|
|||||||
SPLVAR;
|
SPLVAR;
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
rxi_DestroyConnection(conn);
|
rxi_DestroyConnection(conn);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1022,11 +1014,9 @@ rx_GetConnection(register struct rx_connection *conn)
|
|||||||
SPLVAR;
|
SPLVAR;
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&conn->conn_data_lock);
|
MUTEX_ENTER(&conn->conn_data_lock);
|
||||||
conn->refCount++;
|
conn->refCount++;
|
||||||
MUTEX_EXIT(&conn->conn_data_lock);
|
MUTEX_EXIT(&conn->conn_data_lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1052,7 +1042,6 @@ rx_NewCall(register struct rx_connection *conn)
|
|||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
clock_GetTime(&queueTime);
|
clock_GetTime(&queueTime);
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&conn->conn_call_lock);
|
MUTEX_ENTER(&conn->conn_call_lock);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1127,12 +1116,10 @@ rx_NewCall(register struct rx_connection *conn)
|
|||||||
|
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
MUTEX_EXIT(&conn->conn_call_lock);
|
MUTEX_EXIT(&conn->conn_call_lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
|
|
||||||
#ifdef AFS_GLOBAL_RXLOCK_KERNEL
|
#ifdef AFS_GLOBAL_RXLOCK_KERNEL
|
||||||
/* Now, if TQ wasn't cleared earlier, do it now. */
|
/* Now, if TQ wasn't cleared earlier, do it now. */
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
while (call->flags & RX_CALL_TQ_BUSY) {
|
while (call->flags & RX_CALL_TQ_BUSY) {
|
||||||
call->flags |= RX_CALL_TQ_WAIT;
|
call->flags |= RX_CALL_TQ_WAIT;
|
||||||
@ -1147,7 +1134,6 @@ rx_NewCall(register struct rx_connection *conn)
|
|||||||
queue_Init(&call->tq);
|
queue_Init(&call->tq);
|
||||||
}
|
}
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
|
#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
|
||||||
|
|
||||||
return call;
|
return call;
|
||||||
@ -1250,7 +1236,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName,
|
|||||||
|
|
||||||
tservice = rxi_AllocService();
|
tservice = rxi_AllocService();
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
for (i = 0; i < RX_MAX_SERVICES; i++) {
|
for (i = 0; i < RX_MAX_SERVICES; i++) {
|
||||||
register struct rx_service *service = rx_services[i];
|
register struct rx_service *service = rx_services[i];
|
||||||
if (service) {
|
if (service) {
|
||||||
@ -1263,7 +1248,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName,
|
|||||||
(osi_Msg
|
(osi_Msg
|
||||||
"rx_NewService: tried to install service %s with service id %d, which is already in use for service %s\n",
|
"rx_NewService: tried to install service %s with service id %d, which is already in use for service %s\n",
|
||||||
serviceName, serviceId, service->serviceName);
|
serviceName, serviceId, service->serviceName);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
rxi_FreeService(tservice);
|
rxi_FreeService(tservice);
|
||||||
return service;
|
return service;
|
||||||
@ -1278,7 +1262,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName,
|
|||||||
* service on same port) get a new one */
|
* service on same port) get a new one */
|
||||||
socket = rxi_GetHostUDPSocket(htonl(INADDR_ANY), port);
|
socket = rxi_GetHostUDPSocket(htonl(INADDR_ANY), port);
|
||||||
if (socket == OSI_NULLSOCKET) {
|
if (socket == OSI_NULLSOCKET) {
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
rxi_FreeService(tservice);
|
rxi_FreeService(tservice);
|
||||||
return 0;
|
return 0;
|
||||||
@ -1298,12 +1281,10 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName,
|
|||||||
service->executeRequestProc = serviceProc;
|
service->executeRequestProc = serviceProc;
|
||||||
service->checkReach = 0;
|
service->checkReach = 0;
|
||||||
rx_services[i] = service; /* not visible until now */
|
rx_services[i] = service; /* not visible until now */
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return service;
|
return service;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
rxi_FreeService(tservice);
|
rxi_FreeService(tservice);
|
||||||
(osi_Msg "rx_NewService: cannot support > %d services\n",
|
(osi_Msg "rx_NewService: cannot support > %d services\n",
|
||||||
@ -1343,14 +1324,12 @@ rxi_ServerProc(int threadID, struct rx_call *newcall, osi_socket * socketp)
|
|||||||
SPLVAR;
|
SPLVAR;
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
|
|
||||||
rxi_CallError(call, RX_RESTARTING);
|
rxi_CallError(call, RX_RESTARTING);
|
||||||
rxi_SendCallAbort(call, (struct rx_packet *)0, 0, 0);
|
rxi_SendCallAbort(call, (struct rx_packet *)0, 0, 0);
|
||||||
|
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
}
|
}
|
||||||
#ifdef KERNEL
|
#ifdef KERNEL
|
||||||
@ -1392,7 +1371,6 @@ rx_WakeupServerProcs(void)
|
|||||||
SPLVAR;
|
SPLVAR;
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&rx_serverPool_lock);
|
MUTEX_ENTER(&rx_serverPool_lock);
|
||||||
|
|
||||||
#ifdef RX_ENABLE_LOCKS
|
#ifdef RX_ENABLE_LOCKS
|
||||||
@ -1420,7 +1398,6 @@ rx_WakeupServerProcs(void)
|
|||||||
#endif /* RX_ENABLE_LOCKS */
|
#endif /* RX_ENABLE_LOCKS */
|
||||||
}
|
}
|
||||||
MUTEX_EXIT(&rx_serverPool_lock);
|
MUTEX_EXIT(&rx_serverPool_lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1631,7 +1608,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
|
|||||||
SPLVAR;
|
SPLVAR;
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&freeSQEList_lock);
|
MUTEX_ENTER(&freeSQEList_lock);
|
||||||
|
|
||||||
if ((sq = rx_FreeSQEList)) {
|
if ((sq = rx_FreeSQEList)) {
|
||||||
@ -1726,7 +1702,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
|
|||||||
osi_rxSleep(sq);
|
osi_rxSleep(sq);
|
||||||
#ifdef KERNEL
|
#ifdef KERNEL
|
||||||
if (afs_termState == AFSOP_STOP_RXCALLBACK) {
|
if (afs_termState == AFSOP_STOP_RXCALLBACK) {
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
rxi_Free(sq, sizeof(struct rx_serverQueueEntry));
|
rxi_Free(sq, sizeof(struct rx_serverQueueEntry));
|
||||||
return (struct rx_call *)0;
|
return (struct rx_call *)0;
|
||||||
@ -1767,7 +1742,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
|
|||||||
dpf(("rx_GetCall(socketp=0x%x, *socketp=0x%x)\n", socketp, *socketp));
|
dpf(("rx_GetCall(socketp=0x%x, *socketp=0x%x)\n", socketp, *socketp));
|
||||||
}
|
}
|
||||||
|
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
|
|
||||||
return call;
|
return call;
|
||||||
@ -1815,7 +1789,6 @@ rx_EndCall(register struct rx_call *call, afs_int32 rc)
|
|||||||
dpf(("rx_EndCall(call %x)\n", call));
|
dpf(("rx_EndCall(call %x)\n", call));
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
|
|
||||||
if (rc == 0 && call->error == 0) {
|
if (rc == 0 && call->error == 0) {
|
||||||
@ -1926,7 +1899,6 @@ rx_EndCall(register struct rx_call *call, afs_int32 rc)
|
|||||||
MUTEX_EXIT(&conn->conn_call_lock);
|
MUTEX_EXIT(&conn->conn_call_lock);
|
||||||
conn->flags &= ~RX_CONN_BUSY;
|
conn->flags &= ~RX_CONN_BUSY;
|
||||||
}
|
}
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
/*
|
/*
|
||||||
* Map errors to the local host's errno.h format.
|
* Map errors to the local host's errno.h format.
|
||||||
|
@ -198,7 +198,6 @@ _rxevent_Post(struct clock *when, void (*func) (), void *arg, void *arg1,
|
|||||||
int isEarliest = 0;
|
int isEarliest = 0;
|
||||||
|
|
||||||
MUTEX_ENTER(&rxevent_lock);
|
MUTEX_ENTER(&rxevent_lock);
|
||||||
AFS_ASSERT_RXGLOCK();
|
|
||||||
#ifdef RXDEBUG
|
#ifdef RXDEBUG
|
||||||
if (rx_Log_event) {
|
if (rx_Log_event) {
|
||||||
struct clock now;
|
struct clock now;
|
||||||
@ -337,7 +336,6 @@ rxevent_Cancel_1(register struct rxevent *ev, register struct rx_call *call,
|
|||||||
/* Append it to the free list (rather than prepending) to keep the free
|
/* Append it to the free list (rather than prepending) to keep the free
|
||||||
* list hot so nothing pages out
|
* list hot so nothing pages out
|
||||||
*/
|
*/
|
||||||
AFS_ASSERT_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&rxevent_lock);
|
MUTEX_ENTER(&rxevent_lock);
|
||||||
if (!ev) {
|
if (!ev) {
|
||||||
MUTEX_EXIT(&rxevent_lock);
|
MUTEX_EXIT(&rxevent_lock);
|
||||||
@ -383,8 +381,6 @@ rxevent_RaiseEvents(struct clock *next)
|
|||||||
|
|
||||||
MUTEX_ENTER(&rxevent_lock);
|
MUTEX_ENTER(&rxevent_lock);
|
||||||
|
|
||||||
AFS_ASSERT_RXGLOCK();
|
|
||||||
|
|
||||||
/* Events are sorted by time, so only scan until an event is found that has
|
/* Events are sorted by time, so only scan until an event is found that has
|
||||||
* not yet timed out */
|
* not yet timed out */
|
||||||
|
|
||||||
|
@ -964,9 +964,7 @@ afs_rxevent_daemon(void)
|
|||||||
AFS_GUNLOCK();
|
AFS_GUNLOCK();
|
||||||
#endif /* RX_ENABLE_LOCKS */
|
#endif /* RX_ENABLE_LOCKS */
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
rxevent_RaiseEvents(&temp);
|
rxevent_RaiseEvents(&temp);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
#ifdef RX_ENABLE_LOCKS
|
#ifdef RX_ENABLE_LOCKS
|
||||||
AFS_GLOCK();
|
AFS_GLOCK();
|
||||||
@ -1151,9 +1149,7 @@ rxk_Listener(void)
|
|||||||
osi_Panic("rxk_Listener: No more Rx buffers!\n");
|
osi_Panic("rxk_Listener: No more Rx buffers!\n");
|
||||||
}
|
}
|
||||||
if (!(code = rxk_ReadPacket(rx_socket, rxp, &host, &port))) {
|
if (!(code = rxk_ReadPacket(rx_socket, rxp, &host, &port))) {
|
||||||
AFS_RXGLOCK();
|
|
||||||
rxp = rxi_ReceivePacket(rxp, rx_socket, host, port, 0, 0);
|
rxp = rxi_ReceivePacket(rxp, rx_socket, host, port, 0, 0);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
|
|
||||||
#define CALL_HOLD(call, type)
|
#define CALL_HOLD(call, type)
|
||||||
#define CALL_RELE(call, type)
|
#define CALL_RELE(call, type)
|
||||||
#define RXObtainWriteLock(a) AFS_ASSERT_RXGLOCK()
|
|
||||||
#define RXReleaseWriteLock(a)
|
|
||||||
|
|
||||||
#define MUTEX_DESTROY(a)
|
#define MUTEX_DESTROY(a)
|
||||||
#define MUTEX_ENTER(a)
|
#define MUTEX_ENTER(a)
|
||||||
|
@ -393,7 +393,6 @@ rxi_MorePackets(int apackets)
|
|||||||
PIN(p, getme); /* XXXXX */
|
PIN(p, getme); /* XXXXX */
|
||||||
memset((char *)p, 0, getme);
|
memset((char *)p, 0, getme);
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&rx_freePktQ_lock);
|
MUTEX_ENTER(&rx_freePktQ_lock);
|
||||||
|
|
||||||
for (e = p + apackets; p < e; p++) {
|
for (e = p + apackets; p < e; p++) {
|
||||||
@ -410,7 +409,6 @@ rxi_MorePackets(int apackets)
|
|||||||
rxi_NeedMorePackets = FALSE;
|
rxi_NeedMorePackets = FALSE;
|
||||||
rxi_PacketsUnWait();
|
rxi_PacketsUnWait();
|
||||||
|
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
MUTEX_EXIT(&rx_freePktQ_lock);
|
MUTEX_EXIT(&rx_freePktQ_lock);
|
||||||
USERPRI;
|
USERPRI;
|
||||||
}
|
}
|
||||||
@ -1487,7 +1485,6 @@ rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket,
|
|||||||
} else
|
} else
|
||||||
nbytes -= apacket->wirevec[i].iov_len;
|
nbytes -= apacket->wirevec[i].iov_len;
|
||||||
}
|
}
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
#ifdef KERNEL
|
#ifdef KERNEL
|
||||||
#ifdef RX_KERNEL_TRACE
|
#ifdef RX_KERNEL_TRACE
|
||||||
if (ICL_SETACTIVE(afs_iclSetp)) {
|
if (ICL_SETACTIVE(afs_iclSetp)) {
|
||||||
@ -1519,7 +1516,6 @@ rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket,
|
|||||||
AFS_GLOCK();
|
AFS_GLOCK();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
AFS_RXGLOCK();
|
|
||||||
if (saven) { /* means we truncated the packet above. */
|
if (saven) { /* means we truncated the packet above. */
|
||||||
apacket->wirevec[i - 1].iov_len = savelen;
|
apacket->wirevec[i - 1].iov_len = savelen;
|
||||||
apacket->niovecs = saven;
|
apacket->niovecs = saven;
|
||||||
@ -1605,7 +1601,6 @@ rxi_SendPacket(struct rx_call *call, struct rx_connection *conn,
|
|||||||
* blocking socket, but unfortunately the interface doesn't
|
* blocking socket, but unfortunately the interface doesn't
|
||||||
* allow us to have the socket block in send mode, and not
|
* allow us to have the socket block in send mode, and not
|
||||||
* block in receive mode */
|
* block in receive mode */
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
#ifdef KERNEL
|
#ifdef KERNEL
|
||||||
waslocked = ISAFS_GLOCK();
|
waslocked = ISAFS_GLOCK();
|
||||||
#ifdef RX_KERNEL_TRACE
|
#ifdef RX_KERNEL_TRACE
|
||||||
@ -1656,7 +1651,6 @@ rxi_SendPacket(struct rx_call *call, struct rx_connection *conn,
|
|||||||
AFS_GLOCK();
|
AFS_GLOCK();
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
AFS_RXGLOCK();
|
|
||||||
#ifdef RXDEBUG
|
#ifdef RXDEBUG
|
||||||
}
|
}
|
||||||
dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %lx resend %d.%0.3d len %d", deliveryType, p->header.serial, rx_packetTypes[p->header.type - 1], peer->host, peer->port, p->header.serial, p->header.epoch, p->header.cid, p->header.callNumber, p->header.seq, p->header.flags, (unsigned long)p, p->retryTime.sec, p->retryTime.usec / 1000, p->length));
|
dpf(("%c %d %s: %x.%u.%u.%u.%u.%u.%u flags %d, packet %lx resend %d.%0.3d len %d", deliveryType, p->header.serial, rx_packetTypes[p->header.type - 1], peer->host, peer->port, p->header.serial, p->header.epoch, p->header.cid, p->header.callNumber, p->header.seq, p->header.flags, (unsigned long)p, p->retryTime.sec, p->retryTime.usec / 1000, p->length));
|
||||||
@ -1799,7 +1793,6 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn,
|
|||||||
* blocking socket, but unfortunately the interface doesn't
|
* blocking socket, but unfortunately the interface doesn't
|
||||||
* allow us to have the socket block in send mode, and not
|
* allow us to have the socket block in send mode, and not
|
||||||
* block in receive mode */
|
* block in receive mode */
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
#if defined(AFS_SUN5_ENV) && defined(KERNEL)
|
#if defined(AFS_SUN5_ENV) && defined(KERNEL)
|
||||||
waslocked = ISAFS_GLOCK();
|
waslocked = ISAFS_GLOCK();
|
||||||
if (!istack && waslocked)
|
if (!istack && waslocked)
|
||||||
@ -1832,7 +1825,6 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn,
|
|||||||
if (!istack && waslocked)
|
if (!istack && waslocked)
|
||||||
AFS_GLOCK();
|
AFS_GLOCK();
|
||||||
#endif
|
#endif
|
||||||
AFS_RXGLOCK();
|
|
||||||
#ifdef RXDEBUG
|
#ifdef RXDEBUG
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,16 +94,6 @@ extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg);
|
|||||||
#endif
|
#endif
|
||||||
#define MUTEX_EXIT(l) osi_Assert(pthread_mutex_unlock(l) == 0)
|
#define MUTEX_EXIT(l) osi_Assert(pthread_mutex_unlock(l) == 0)
|
||||||
|
|
||||||
#ifdef RXObtainWriteLock
|
|
||||||
#undef RXObtainWriteLock
|
|
||||||
#endif
|
|
||||||
#define RXObtainWriteLock(l) MUTEX_ENTER(l)
|
|
||||||
|
|
||||||
#ifdef RXReleaseWriteLock
|
|
||||||
#undef RXReleaseWriteLock
|
|
||||||
#endif
|
|
||||||
#define RXReleaseWriteLock(l) MUTEX_EXIT(l)
|
|
||||||
|
|
||||||
#ifdef CV_INIT
|
#ifdef CV_INIT
|
||||||
#undef CV_INIT
|
#undef CV_INIT
|
||||||
#endif
|
#endif
|
||||||
|
@ -337,11 +337,9 @@ rx_ReadProc(struct rx_call *call, char *buf, int nbytes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
bytes = rxi_ReadProc(call, buf, nbytes);
|
bytes = rxi_ReadProc(call, buf, nbytes);
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
@ -396,11 +394,9 @@ rx_ReadProc32(struct rx_call *call, afs_int32 * value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
bytes = rxi_ReadProc(call, (char *)value, sizeof(afs_int32));
|
bytes = rxi_ReadProc(call, (char *)value, sizeof(afs_int32));
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
@ -644,11 +640,9 @@ rx_ReadvProc(struct rx_call *call, struct iovec *iov, int *nio, int maxio,
|
|||||||
SPLVAR;
|
SPLVAR;
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
bytes = rxi_ReadvProc(call, iov, nio, maxio, nbytes);
|
bytes = rxi_ReadvProc(call, iov, nio, maxio, nbytes);
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
@ -867,11 +861,9 @@ rx_WriteProc(struct rx_call *call, char *buf, int nbytes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
bytes = rxi_WriteProc(call, buf, nbytes);
|
bytes = rxi_WriteProc(call, buf, nbytes);
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
@ -926,11 +918,9 @@ rx_WriteProc32(register struct rx_call *call, register afs_int32 * value)
|
|||||||
}
|
}
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
bytes = rxi_WriteProc(call, (char *)value, sizeof(afs_int32));
|
bytes = rxi_WriteProc(call, (char *)value, sizeof(afs_int32));
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
@ -1059,11 +1049,9 @@ rx_WritevAlloc(struct rx_call *call, struct iovec *iov, int *nio, int maxio,
|
|||||||
SPLVAR;
|
SPLVAR;
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
bytes = rxi_WritevAlloc(call, iov, nio, maxio, nbytes);
|
bytes = rxi_WritevAlloc(call, iov, nio, maxio, nbytes);
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
@ -1230,11 +1218,9 @@ rx_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
|
|||||||
SPLVAR;
|
SPLVAR;
|
||||||
|
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
bytes = rxi_WritevProc(call, iov, nio, nbytes);
|
bytes = rxi_WritevProc(call, iov, nio, nbytes);
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
return bytes;
|
return bytes;
|
||||||
}
|
}
|
||||||
@ -1324,10 +1310,8 @@ rx_FlushWrite(struct rx_call *call)
|
|||||||
{
|
{
|
||||||
SPLVAR;
|
SPLVAR;
|
||||||
NETPRI;
|
NETPRI;
|
||||||
AFS_RXGLOCK();
|
|
||||||
MUTEX_ENTER(&call->lock);
|
MUTEX_ENTER(&call->lock);
|
||||||
rxi_FlushWrite(call);
|
rxi_FlushWrite(call);
|
||||||
MUTEX_EXIT(&call->lock);
|
MUTEX_EXIT(&call->lock);
|
||||||
AFS_RXGUNLOCK();
|
|
||||||
USERPRI;
|
USERPRI;
|
||||||
}
|
}
|
||||||
|
@ -24,14 +24,10 @@ error - foo error - foo error - foo
|
|||||||
#define AFS_GLOCK()
|
#define AFS_GLOCK()
|
||||||
#define AFS_GUNLOCK()
|
#define AFS_GUNLOCK()
|
||||||
#define AFS_ASSERT_GLOCK()
|
#define AFS_ASSERT_GLOCK()
|
||||||
#define AFS_RXGLOCK()
|
|
||||||
#define AFS_RXGUNLOCK()
|
|
||||||
#ifndef UKERNEL
|
#ifndef UKERNEL
|
||||||
/* Defined in rx/UKERNEL/rx_kmutex.h */
|
/* Defined in rx/UKERNEL/rx_kmutex.h */
|
||||||
#define ISAFS_GLOCK()
|
#define ISAFS_GLOCK()
|
||||||
#define ISAFS_RXGLOCK()
|
|
||||||
#endif
|
#endif
|
||||||
#define AFS_ASSERT_RXGLOCK()
|
|
||||||
/* Some "operating-system independent" stuff, for the user mode implementation */
|
/* Some "operating-system independent" stuff, for the user mode implementation */
|
||||||
#ifdef UAFS_CLIENT
|
#ifdef UAFS_CLIENT
|
||||||
typedef void *osi_socket;
|
typedef void *osi_socket;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user