mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
kill-rxglock-20050413
FIXES 18222 the rxglock was being defined out by all the platforms, just kill it.
This commit is contained in:
parent
12df63ce9a
commit
dbeab01c12
@ -69,10 +69,6 @@ extern simple_lock_data afs_global_lock;
|
||||
simple_unlock((void *)&afs_global_lock); \
|
||||
} while(0)
|
||||
#define ISAFS_GLOCK() lock_mine((void *)&afs_global_lock)
|
||||
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
#endif
|
||||
|
||||
#endif /* _OSI_MACHDEP_H_ */
|
||||
|
@ -85,9 +85,6 @@ extern struct lock__bsd__ afs_global_lock;
|
||||
lockmgr(&afs_global_lock, LK_RELEASE, 0, current_proc()); \
|
||||
} while(0)
|
||||
#define ISAFS_GLOCK() (afs_global_owner == current_thread())
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
|
||||
#define SPLVAR
|
||||
#define NETPRI
|
||||
|
@ -63,9 +63,6 @@ extern thread_t afs_global_owner;
|
||||
usimple_unlock(&afs_global_lock); \
|
||||
} while(0)
|
||||
#define ISAFS_GLOCK() (afs_global_owner == current_thread())
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
|
||||
#undef SPLVAR
|
||||
#define SPLVAR
|
||||
|
@ -107,10 +107,6 @@ extern struct proc *afs_global_owner;
|
||||
#define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
|
||||
#endif /* FBSD50 */
|
||||
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
|
||||
#undef SPLVAR
|
||||
#define SPLVAR int splvar
|
||||
#undef NETPRI
|
||||
|
@ -80,10 +80,6 @@ extern void afsHashRelease(tid_t key);
|
||||
|
||||
#endif
|
||||
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
|
||||
/* Uses splnet only in the SP case */
|
||||
#define SPLVAR register ulong_t 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))
|
||||
#define ISAFS_GLOCK() (osi_ThreadUnique() == afs_global_owner)
|
||||
#endif /* AFS_SGI64_ENV */
|
||||
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
|
||||
#else /* MP */
|
||||
#define AFS_GLOCK()
|
||||
#define AFS_GUNLOCK()
|
||||
|
@ -225,10 +225,6 @@ do { \
|
||||
#define AFS_GUNLOCK()
|
||||
#define ISAFS_GLOCK() 1
|
||||
#define AFS_ASSERT_GLOCK()
|
||||
#define AFS_ASSERT_RXGLOCK()
|
||||
#endif
|
||||
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
#endif /* OSI_MACHDEP_H_ */
|
||||
|
@ -76,9 +76,6 @@ extern thread_t afs_global_owner;
|
||||
simple_unlock(&afs_global_lock); \
|
||||
} while(0)
|
||||
#endif /* 0 */
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
|
||||
#undef SPLVAR
|
||||
#define SPLVAR
|
||||
|
@ -139,9 +139,6 @@ extern struct simplelock afs_global_lock;
|
||||
#define AFS_ASSERT_GLOCK()
|
||||
#define ISAFS_GLOCK() 1
|
||||
#endif
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
|
||||
#undef 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_GUNLOCK() mutex_exit(&afs_global_lock);
|
||||
#define ISAFS_GLOCK() mutex_owned(&afs_global_lock)
|
||||
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -459,16 +459,12 @@ afs_osi_Sleep(void *x)
|
||||
{
|
||||
int index;
|
||||
osi_wait_t *waitp;
|
||||
int rxGlockOwner = ISAFS_RXGLOCK();
|
||||
int glockOwner = ISAFS_GLOCK();
|
||||
|
||||
usr_mutex_lock(&osi_waitq_lock);
|
||||
if (glockOwner) {
|
||||
AFS_GUNLOCK();
|
||||
}
|
||||
if (rxGlockOwner) {
|
||||
AFS_RXGUNLOCK();
|
||||
}
|
||||
index = WAITHASH(x);
|
||||
if (osi_waithash_avail == NULL) {
|
||||
waitp = (osi_wait_t *) afs_osi_Alloc(sizeof(osi_wait_t));
|
||||
@ -495,9 +491,6 @@ afs_osi_Sleep(void *x)
|
||||
if (glockOwner) {
|
||||
AFS_GLOCK();
|
||||
}
|
||||
if (rxGlockOwner) {
|
||||
AFS_RXGLOCK();
|
||||
}
|
||||
}
|
||||
|
||||
int
|
||||
@ -533,7 +526,6 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok)
|
||||
osi_wait_t *waitp;
|
||||
struct timespec tv;
|
||||
int ret;
|
||||
int rxGlockOwner = ISAFS_RXGLOCK();
|
||||
int glockOwner = ISAFS_GLOCK();
|
||||
|
||||
tv.tv_sec = msec / 1000;
|
||||
@ -542,25 +534,16 @@ afs_osi_Wait(afs_int32 msec, struct afs_osi_WaitHandle *handle, int intok)
|
||||
if (glockOwner) {
|
||||
AFS_GUNLOCK();
|
||||
}
|
||||
if (rxGlockOwner) {
|
||||
AFS_RXGUNLOCK();
|
||||
}
|
||||
usr_thread_sleep(&tv);
|
||||
ret = 0;
|
||||
if (glockOwner) {
|
||||
AFS_GLOCK();
|
||||
}
|
||||
if (rxGlockOwner) {
|
||||
AFS_RXGLOCK();
|
||||
}
|
||||
} else {
|
||||
usr_mutex_lock(&osi_waitq_lock);
|
||||
if (glockOwner) {
|
||||
AFS_GUNLOCK();
|
||||
}
|
||||
if (rxGlockOwner) {
|
||||
AFS_RXGUNLOCK();
|
||||
}
|
||||
index = WAITHASH((caddr_t) handle);
|
||||
if (osi_waithash_avail == NULL) {
|
||||
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) {
|
||||
AFS_GLOCK();
|
||||
}
|
||||
if (rxGlockOwner) {
|
||||
AFS_RXGLOCK();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
@ -208,8 +208,6 @@ typedef struct timeval osi_timeval_t;
|
||||
#ifdef AFS_GLOBAL_SUNLOCK
|
||||
#define AFS_ASSERT_GLOCK() \
|
||||
(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 */
|
||||
|
||||
#ifdef RX_ENABLE_LOCKS
|
||||
@ -227,10 +225,6 @@ typedef struct timeval osi_timeval_t;
|
||||
#define AFS_GUNLOCK()
|
||||
#define ISAFS_GLOCK() 1
|
||||
#define AFS_ASSERT_GLOCK()
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
#define AFS_ASSERT_RXGLOCK()
|
||||
#endif
|
||||
|
||||
/* 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 MReleaseWriteLock
|
||||
#ifndef RXObtainWriteLock
|
||||
#define RXObtainWriteLock(lock) ObtainWriteLock(lock)
|
||||
#define RXReleaseWriteLock(lock) ReleaseWriteLock(lock)
|
||||
#endif
|
||||
#define MObtainReadLock(lock) ObtainReadLock(lock)
|
||||
#define MObtainWriteLock(lock,src) ObtainWriteLock(lock,src)
|
||||
#define MObtainSharedLock(lock,src) ObtainSharedLock(lock,src)
|
||||
|
@ -68,15 +68,6 @@ typedef tid_t afs_kcondvar_t;
|
||||
__LINE__), \
|
||||
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) \
|
||||
do { \
|
||||
int haveGlock = ISAFS_GLOCK(); \
|
||||
@ -112,8 +103,6 @@ typedef tid_t afs_kcondvar_t;
|
||||
#define MUTEX_ENTER(a) simple_lock((void *)(a))
|
||||
#define MUTEX_TRYENTER(a) simple_lock_try((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) \
|
||||
do { \
|
||||
|
@ -144,7 +144,6 @@ rxk_input(struct mbuf *am, int iphlen)
|
||||
*/
|
||||
data_len = ntohs(tu->uh_ulen);
|
||||
data_len -= 8;
|
||||
AFS_RXGLOCK();
|
||||
if (!(*rxk_GetPacketProc) (&phandle, data_len)) {
|
||||
if (rx_mb_to_packet(am, m_freem, 28, data_len, phandle)) {
|
||||
/* XXX should just increment counter here.. */
|
||||
@ -155,7 +154,6 @@ rxk_input(struct mbuf *am, int iphlen)
|
||||
rxk_portRocks[i], data_len);
|
||||
} else
|
||||
m_freem(am);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return;
|
||||
}
|
||||
|
@ -283,7 +283,6 @@ rxk_input(struct mbuf *am, int iphlen)
|
||||
*/
|
||||
data_len = ntohs(tu->uh_ulen);
|
||||
data_len -= 8;
|
||||
AFS_RXGLOCK();
|
||||
if (!(*rxk_GetPacketProc) (&phandle, data_len)) {
|
||||
if (rx_mb_to_packet(am, m_freem, 28, data_len, phandle)) {
|
||||
/* XXX should just increment counter here.. */
|
||||
@ -294,7 +293,6 @@ rxk_input(struct mbuf *am, int iphlen)
|
||||
rxk_portRocks[i], data_len);
|
||||
} else
|
||||
m_freem(am);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return;
|
||||
}
|
||||
|
@ -132,10 +132,6 @@ typedef caddr_t afs_kcondvar_t;
|
||||
|
||||
#ifdef AFS_HPUX102_ENV
|
||||
|
||||
#define RXObtainWriteLock(a) AFS_ASSERT_RXGLOCK()
|
||||
#define RXReleaseWriteLock(a)
|
||||
|
||||
|
||||
#if defined(AFS_HPUX110_ENV)
|
||||
#undef osirx_AssertMine
|
||||
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 */
|
||||
#define RX_ENABLE_LOCKS 1
|
||||
#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 */
|
||||
|
||||
|
@ -49,11 +49,6 @@
|
||||
extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg);
|
||||
#endif
|
||||
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#define ISAFS_RXGLOCK() 1
|
||||
#define AFS_ASSERT_RXGLOCK()
|
||||
|
||||
#define SPLVAR
|
||||
#define NETPRI
|
||||
#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();
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
|
||||
clock_Init();
|
||||
|
||||
@ -534,7 +533,6 @@ rx_InitHost(u_int host, u_int port)
|
||||
* implementation environment--kernel or user space) */
|
||||
rxi_StartListener();
|
||||
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
tmp_status = rxinit_status = 0;
|
||||
UNLOCK_RX_INIT;
|
||||
@ -667,7 +665,6 @@ rx_StartServer(int donateMe)
|
||||
clock_NewTime();
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
/* Start server processes, if necessary (exact function is dependent
|
||||
* 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
|
||||
@ -694,7 +691,6 @@ rx_StartServer(int donateMe)
|
||||
/* Turn on reaping of idle server connections */
|
||||
rxi_ReapConnections();
|
||||
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
|
||||
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);
|
||||
#endif
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&rx_connHashTable_lock);
|
||||
cid = (rx_nextCid += RX_MAXCALLS);
|
||||
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_connHashTable_lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return conn;
|
||||
}
|
||||
@ -1010,9 +1004,7 @@ rx_DestroyConnection(register struct rx_connection *conn)
|
||||
SPLVAR;
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
rxi_DestroyConnection(conn);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
}
|
||||
|
||||
@ -1022,11 +1014,9 @@ rx_GetConnection(register struct rx_connection *conn)
|
||||
SPLVAR;
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&conn->conn_data_lock);
|
||||
conn->refCount++;
|
||||
MUTEX_EXIT(&conn->conn_data_lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
}
|
||||
|
||||
@ -1052,7 +1042,6 @@ rx_NewCall(register struct rx_connection *conn)
|
||||
|
||||
NETPRI;
|
||||
clock_GetTime(&queueTime);
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&conn->conn_call_lock);
|
||||
|
||||
/*
|
||||
@ -1127,12 +1116,10 @@ rx_NewCall(register struct rx_connection *conn)
|
||||
|
||||
MUTEX_EXIT(&call->lock);
|
||||
MUTEX_EXIT(&conn->conn_call_lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
|
||||
#ifdef AFS_GLOBAL_RXLOCK_KERNEL
|
||||
/* Now, if TQ wasn't cleared earlier, do it now. */
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
while (call->flags & RX_CALL_TQ_BUSY) {
|
||||
call->flags |= RX_CALL_TQ_WAIT;
|
||||
@ -1147,7 +1134,6 @@ rx_NewCall(register struct rx_connection *conn)
|
||||
queue_Init(&call->tq);
|
||||
}
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
#endif /* AFS_GLOBAL_RXLOCK_KERNEL */
|
||||
|
||||
return call;
|
||||
@ -1250,7 +1236,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName,
|
||||
|
||||
tservice = rxi_AllocService();
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
for (i = 0; i < RX_MAX_SERVICES; i++) {
|
||||
register struct rx_service *service = rx_services[i];
|
||||
if (service) {
|
||||
@ -1263,7 +1248,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName,
|
||||
(osi_Msg
|
||||
"rx_NewService: tried to install service %s with service id %d, which is already in use for service %s\n",
|
||||
serviceName, serviceId, service->serviceName);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
rxi_FreeService(tservice);
|
||||
return service;
|
||||
@ -1278,7 +1262,6 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName,
|
||||
* service on same port) get a new one */
|
||||
socket = rxi_GetHostUDPSocket(htonl(INADDR_ANY), port);
|
||||
if (socket == OSI_NULLSOCKET) {
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
rxi_FreeService(tservice);
|
||||
return 0;
|
||||
@ -1298,12 +1281,10 @@ rx_NewService(u_short port, u_short serviceId, char *serviceName,
|
||||
service->executeRequestProc = serviceProc;
|
||||
service->checkReach = 0;
|
||||
rx_services[i] = service; /* not visible until now */
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return service;
|
||||
}
|
||||
}
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
rxi_FreeService(tservice);
|
||||
(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;
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
|
||||
rxi_CallError(call, RX_RESTARTING);
|
||||
rxi_SendCallAbort(call, (struct rx_packet *)0, 0, 0);
|
||||
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
}
|
||||
#ifdef KERNEL
|
||||
@ -1392,7 +1371,6 @@ rx_WakeupServerProcs(void)
|
||||
SPLVAR;
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&rx_serverPool_lock);
|
||||
|
||||
#ifdef RX_ENABLE_LOCKS
|
||||
@ -1420,7 +1398,6 @@ rx_WakeupServerProcs(void)
|
||||
#endif /* RX_ENABLE_LOCKS */
|
||||
}
|
||||
MUTEX_EXIT(&rx_serverPool_lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
}
|
||||
|
||||
@ -1631,7 +1608,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
|
||||
SPLVAR;
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&freeSQEList_lock);
|
||||
|
||||
if ((sq = rx_FreeSQEList)) {
|
||||
@ -1726,7 +1702,6 @@ rx_GetCall(int tno, struct rx_service *cur_service, osi_socket * socketp)
|
||||
osi_rxSleep(sq);
|
||||
#ifdef KERNEL
|
||||
if (afs_termState == AFSOP_STOP_RXCALLBACK) {
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
rxi_Free(sq, sizeof(struct rx_serverQueueEntry));
|
||||
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));
|
||||
}
|
||||
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
|
||||
return call;
|
||||
@ -1815,7 +1789,6 @@ rx_EndCall(register struct rx_call *call, afs_int32 rc)
|
||||
dpf(("rx_EndCall(call %x)\n", call));
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
|
||||
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);
|
||||
conn->flags &= ~RX_CONN_BUSY;
|
||||
}
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
/*
|
||||
* 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;
|
||||
|
||||
MUTEX_ENTER(&rxevent_lock);
|
||||
AFS_ASSERT_RXGLOCK();
|
||||
#ifdef RXDEBUG
|
||||
if (rx_Log_event) {
|
||||
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
|
||||
* list hot so nothing pages out
|
||||
*/
|
||||
AFS_ASSERT_RXGLOCK();
|
||||
MUTEX_ENTER(&rxevent_lock);
|
||||
if (!ev) {
|
||||
MUTEX_EXIT(&rxevent_lock);
|
||||
@ -383,8 +381,6 @@ rxevent_RaiseEvents(struct clock *next)
|
||||
|
||||
MUTEX_ENTER(&rxevent_lock);
|
||||
|
||||
AFS_ASSERT_RXGLOCK();
|
||||
|
||||
/* Events are sorted by time, so only scan until an event is found that has
|
||||
* not yet timed out */
|
||||
|
||||
|
@ -964,9 +964,7 @@ afs_rxevent_daemon(void)
|
||||
AFS_GUNLOCK();
|
||||
#endif /* RX_ENABLE_LOCKS */
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
rxevent_RaiseEvents(&temp);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
#ifdef RX_ENABLE_LOCKS
|
||||
AFS_GLOCK();
|
||||
@ -1151,9 +1149,7 @@ rxk_Listener(void)
|
||||
osi_Panic("rxk_Listener: No more Rx buffers!\n");
|
||||
}
|
||||
if (!(code = rxk_ReadPacket(rx_socket, rxp, &host, &port))) {
|
||||
AFS_RXGLOCK();
|
||||
rxp = rxi_ReceivePacket(rxp, rx_socket, host, port, 0, 0);
|
||||
AFS_RXGUNLOCK();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
#define CALL_HOLD(call, type)
|
||||
#define CALL_RELE(call, type)
|
||||
#define RXObtainWriteLock(a) AFS_ASSERT_RXGLOCK()
|
||||
#define RXReleaseWriteLock(a)
|
||||
|
||||
#define MUTEX_DESTROY(a)
|
||||
#define MUTEX_ENTER(a)
|
||||
|
@ -393,7 +393,6 @@ rxi_MorePackets(int apackets)
|
||||
PIN(p, getme); /* XXXXX */
|
||||
memset((char *)p, 0, getme);
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&rx_freePktQ_lock);
|
||||
|
||||
for (e = p + apackets; p < e; p++) {
|
||||
@ -410,7 +409,6 @@ rxi_MorePackets(int apackets)
|
||||
rxi_NeedMorePackets = FALSE;
|
||||
rxi_PacketsUnWait();
|
||||
|
||||
AFS_RXGUNLOCK();
|
||||
MUTEX_EXIT(&rx_freePktQ_lock);
|
||||
USERPRI;
|
||||
}
|
||||
@ -1487,7 +1485,6 @@ rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket,
|
||||
} else
|
||||
nbytes -= apacket->wirevec[i].iov_len;
|
||||
}
|
||||
AFS_RXGUNLOCK();
|
||||
#ifdef KERNEL
|
||||
#ifdef RX_KERNEL_TRACE
|
||||
if (ICL_SETACTIVE(afs_iclSetp)) {
|
||||
@ -1519,7 +1516,6 @@ rxi_SendDebugPacket(struct rx_packet *apacket, osi_socket asocket,
|
||||
AFS_GLOCK();
|
||||
#endif
|
||||
#endif
|
||||
AFS_RXGLOCK();
|
||||
if (saven) { /* means we truncated the packet above. */
|
||||
apacket->wirevec[i - 1].iov_len = savelen;
|
||||
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
|
||||
* allow us to have the socket block in send mode, and not
|
||||
* block in receive mode */
|
||||
AFS_RXGUNLOCK();
|
||||
#ifdef KERNEL
|
||||
waslocked = ISAFS_GLOCK();
|
||||
#ifdef RX_KERNEL_TRACE
|
||||
@ -1656,7 +1651,6 @@ rxi_SendPacket(struct rx_call *call, struct rx_connection *conn,
|
||||
AFS_GLOCK();
|
||||
#endif
|
||||
#endif
|
||||
AFS_RXGLOCK();
|
||||
#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));
|
||||
@ -1799,7 +1793,6 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn,
|
||||
* blocking socket, but unfortunately the interface doesn't
|
||||
* allow us to have the socket block in send mode, and not
|
||||
* block in receive mode */
|
||||
AFS_RXGUNLOCK();
|
||||
#if defined(AFS_SUN5_ENV) && defined(KERNEL)
|
||||
waslocked = ISAFS_GLOCK();
|
||||
if (!istack && waslocked)
|
||||
@ -1832,7 +1825,6 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn,
|
||||
if (!istack && waslocked)
|
||||
AFS_GLOCK();
|
||||
#endif
|
||||
AFS_RXGLOCK();
|
||||
#ifdef RXDEBUG
|
||||
}
|
||||
|
||||
|
@ -94,16 +94,6 @@ extern void osirx_AssertMine(afs_kmutex_t * lockaddr, char *msg);
|
||||
#endif
|
||||
#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
|
||||
#undef CV_INIT
|
||||
#endif
|
||||
|
@ -337,11 +337,9 @@ rx_ReadProc(struct rx_call *call, char *buf, int nbytes)
|
||||
}
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
bytes = rxi_ReadProc(call, buf, nbytes);
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return bytes;
|
||||
}
|
||||
@ -396,11 +394,9 @@ rx_ReadProc32(struct rx_call *call, afs_int32 * value)
|
||||
}
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
bytes = rxi_ReadProc(call, (char *)value, sizeof(afs_int32));
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return bytes;
|
||||
}
|
||||
@ -644,11 +640,9 @@ rx_ReadvProc(struct rx_call *call, struct iovec *iov, int *nio, int maxio,
|
||||
SPLVAR;
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
bytes = rxi_ReadvProc(call, iov, nio, maxio, nbytes);
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return bytes;
|
||||
}
|
||||
@ -867,11 +861,9 @@ rx_WriteProc(struct rx_call *call, char *buf, int nbytes)
|
||||
}
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
bytes = rxi_WriteProc(call, buf, nbytes);
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return bytes;
|
||||
}
|
||||
@ -926,11 +918,9 @@ rx_WriteProc32(register struct rx_call *call, register afs_int32 * value)
|
||||
}
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
bytes = rxi_WriteProc(call, (char *)value, sizeof(afs_int32));
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return bytes;
|
||||
}
|
||||
@ -1059,11 +1049,9 @@ rx_WritevAlloc(struct rx_call *call, struct iovec *iov, int *nio, int maxio,
|
||||
SPLVAR;
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
bytes = rxi_WritevAlloc(call, iov, nio, maxio, nbytes);
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return bytes;
|
||||
}
|
||||
@ -1230,11 +1218,9 @@ rx_WritevProc(struct rx_call *call, struct iovec *iov, int nio, int nbytes)
|
||||
SPLVAR;
|
||||
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
bytes = rxi_WritevProc(call, iov, nio, nbytes);
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
return bytes;
|
||||
}
|
||||
@ -1324,10 +1310,8 @@ rx_FlushWrite(struct rx_call *call)
|
||||
{
|
||||
SPLVAR;
|
||||
NETPRI;
|
||||
AFS_RXGLOCK();
|
||||
MUTEX_ENTER(&call->lock);
|
||||
rxi_FlushWrite(call);
|
||||
MUTEX_EXIT(&call->lock);
|
||||
AFS_RXGUNLOCK();
|
||||
USERPRI;
|
||||
}
|
||||
|
@ -24,14 +24,10 @@ error - foo error - foo error - foo
|
||||
#define AFS_GLOCK()
|
||||
#define AFS_GUNLOCK()
|
||||
#define AFS_ASSERT_GLOCK()
|
||||
#define AFS_RXGLOCK()
|
||||
#define AFS_RXGUNLOCK()
|
||||
#ifndef UKERNEL
|
||||
/* Defined in rx/UKERNEL/rx_kmutex.h */
|
||||
#define ISAFS_GLOCK()
|
||||
#define ISAFS_RXGLOCK()
|
||||
#endif
|
||||
#define AFS_ASSERT_RXGLOCK()
|
||||
/* Some "operating-system independent" stuff, for the user mode implementation */
|
||||
#ifdef UAFS_CLIENT
|
||||
typedef void *osi_socket;
|
||||
|
Loading…
x
Reference in New Issue
Block a user