scp->waitCount = scp->waitRequests = 1;
}
- if (bufLocked)
- lock_ReleaseMutex(&bufp->mx);
-
cm_SyncOpAddToWaitQueue(scp, flags, bufp);
wakeupCycle = 0;
do {
- if (wakeupCycle++ != 0)
- lock_ObtainMutex(&scp->mx);
+ if (bufLocked)
+ lock_ReleaseMutex(&bufp->mx);
osi_SleepM((LONG_PTR) &scp->flags, &scp->mx);
+ if (bufLocked)
+ lock_ObtainMutex(&bufp->mx);
+ lock_ObtainMutex(&scp->mx);
} while (!cm_SyncOpCheckContinue(scp, flags, bufp));
smb_UpdateServerPriority();
- if (bufLocked)
- lock_ObtainMutex(&bufp->mx);
- lock_ObtainMutex(&scp->mx);
scp->waitCount--;
osi_Log3(afsd_logp, "CM SyncOp woke! scp 0x%p; still waiting %d threads of %d requests",
scp, scp->waitCount, scp->waitRequests);
(fidp)->unique)) \
% cm_data.scacheHashTableSize)
+#include "cm_conn.h"
+#include "cm_buf.h"
+
typedef struct cm_scache_waiter {
osi_queue_t q;
afs_int32 threadId;
cm_scache_t *scp;
afs_int32 flags;
- void *bufp;
+ cm_buf_t *bufp;
} cm_scache_waiter_t;
-#include "cm_conn.h"
-#include "cm_buf.h"
-
extern void cm_InitSCache(int, long);
#ifdef DEBUG_REFCOUNT