static
MyBeforeProc(struct rx_call *acall)
{
+ VTRANS_LOCK;
runningCalls++;
+ VTRANS_UNLOCK;
return 0;
}
static
MyAfterProc(struct rx_call *acall, afs_int32 code)
{
+ VTRANS_LOCK;
runningCalls--;
+ VTRANS_UNLOCK;
return 0;
}
{
/* if there are no running calls, and there are no active transactions, then
* it should be safe to release any partition locks we've accumulated */
+ VTRANS_LOCK;
if (runningCalls == 0 && TransList() == (struct volser_trans *)0) {
+ VTRANS_UNLOCK;
VPFullUnlock(); /* in volprocs.c */
- }
+ } else
+ VTRANS_UNLOCK;
}
/* background daemon for timing out transactions */
#else /* AFS_PTHREAD_ENV */
IOMGR_Sleep(TTrun);
#endif
+ VTRANS_LOCK;
for (tt = TransList(); tt; tt = tt->next) {
if ((strcmp(tt->lastProcName, "DeleteVolume") == 0)
|| (strcmp(tt->lastProcName, "Clone") == 0)
break;
}
if (tt) {
+ VTRANS_UNLOCK;
sleep(TTsleep);
- }
+ } else
+ VTRANS_UNLOCK;
}
}
}