{
continue;
}
-
- ExAcquirePushLockExclusive(¤t->Lock);
-
+
+ KeWaitForSingleObject(¤t->Mutex,
+ Executive,
+ KernelMode,
+ FALSE,
+ NULL);
+
ASSERT(current->Dirty);
if (current->ReferenceCount > 1)
{
- ExReleasePushLock(¤t->Lock);
+ KeReleaseMutex(¤t->Mutex, 0);
current->Bcb->Callbacks->ReleaseFromLazyWrite(
current->Bcb->LazyWriteContext);
continue;
}
-
+
PagesPerSegment = current->Bcb->CacheSegmentSize / PAGE_SIZE;
KeReleaseGuardedMutex(&ViewLock);
Status = CcRosFlushCacheSegment(current);
- ExReleasePushLock(¤t->Lock);
+ KeReleaseMutex(¤t->Mutex, 0);
current->Bcb->Callbacks->ReleaseFromLazyWrite(
current->Bcb->LazyWriteContext);
}
KeReleaseSpinLock(&Bcb->BcbLock, oldIrql);
KeReleaseGuardedMutex(&ViewLock);
- ExReleasePushLock(&CacheSeg->Lock);
- KeLeaveCriticalRegion();
+ KeReleaseMutex(&CacheSeg->Mutex, 0);
return(STATUS_SUCCESS);
}
{
CcRosCacheSegmentIncRefCount(current);
KeReleaseSpinLock(&Bcb->BcbLock, oldIrql);
- KeEnterCriticalRegion();
- ExAcquirePushLockExclusive(¤t->Lock);
+ KeWaitForSingleObject(¤t->Mutex,
+ Executive,
+ KernelMode,
+ FALSE,
+ NULL);
return(current);
}
current_entry = current_entry->Flink;
KeReleaseGuardedMutex(&ViewLock);
CacheSeg->Dirty = TRUE;
- ExReleasePushLock(&CacheSeg->Lock);
- KeLeaveCriticalRegion();
+ KeReleaseMutex(&CacheSeg->Mutex, 0);
return(STATUS_SUCCESS);
}
}
KeReleaseSpinLock(&Bcb->BcbLock, oldIrql);
- ExReleasePushLock(&CacheSeg->Lock);
- KeLeaveCriticalRegion();
+ KeReleaseMutex(&CacheSeg->Mutex, 0);
return(STATUS_SUCCESS);
}
current->DirtySegmentListEntry.Flink = NULL;
current->DirtySegmentListEntry.Blink = NULL;
current->ReferenceCount = 1;
- ExInitializePushLock(¤t->Lock);
- KeEnterCriticalRegion();
- ExAcquirePushLockExclusive(¤t->Lock);
+ KeInitializeMutex(¤t->Mutex, 0);
+ KeWaitForSingleObject(¤t->Mutex,
+ Executive,
+ KernelMode,
+ FALSE,
+ NULL);
KeAcquireGuardedMutex(&ViewLock);
*CacheSeg = current;
current );
}
#endif
- ExReleasePushLock(&(*CacheSeg)->Lock);
+ KeReleaseMutex(&(*CacheSeg)->Mutex, 0);
KeReleaseGuardedMutex(&ViewLock);
ExFreeToNPagedLookasideList(&CacheSegLookasideList, *CacheSeg);
*CacheSeg = current;
- /* We're still in the critical region from above */
- ExAcquirePushLockExclusive(¤t->Lock);
+ KeWaitForSingleObject(¤t->Mutex,
+ Executive,
+ KernelMode,
+ FALSE,
+ NULL);
return STATUS_SUCCESS;
}
if (current->FileOffset < FileOffset)
IoStatus->Status = Status;
}
}
- ExReleasePushLock(¤t->Lock);
- KeLeaveCriticalRegion();
+ KeReleaseMutex(¤t->Mutex, 0);
KeAcquireSpinLock(&Bcb->BcbLock, &oldIrql);
CcRosCacheSegmentDecRefCount(current);
KeReleaseSpinLock(&Bcb->BcbLock, oldIrql);