summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar qadeer <unknown>2014-01-02 21:41:23 -0800
committerGravatar qadeer <unknown>2014-01-02 21:41:23 -0800
commit9bbd7da2fd1db08106f42c6d2670cfcd70a3ba20 (patch)
treed966b7767e7ead3b7f78905960a8769026f540d2
parent4a8e72a6446b09b63e28a8c16af47e67913d1801 (diff)
another fix
-rw-r--r--Test/og/DeviceCache.bpl6
1 files changed, 2 insertions, 4 deletions
diff --git a/Test/og/DeviceCache.bpl b/Test/og/DeviceCache.bpl
index 15a99343..a9238cbb 100644
--- a/Test/og/DeviceCache.bpl
+++ b/Test/og/DeviceCache.bpl
@@ -75,8 +75,7 @@ ensures {:phase 1} 0 <= bytesRead && bytesRead <= size;
var {:linear "tid"} tid: X;
tid := tid';
- yield;
- assert {:phase 1} Inv(ghostLock, currsize, newsize);
+ par tid := YieldToReadCache(tid);
bytesRead := size;
call tid := acquire(tid);
call tid, i := ReadCurrsize(tid);
@@ -97,7 +96,7 @@ ensures {:phase 1} 0 <= bytesRead && bytesRead <= size;
READ_DEVICE:
par tid := YieldToWriteCache(tid);
call tid := WriteCache(tid, start + size);
- par tid := YieldToWriteCache(tid);
+ par tid := YieldToReadCache(tid);
call tid := acquire(tid);
call tid, tmp := ReadNewsize(tid);
call tid := WriteCurrsize(tid, tmp);
@@ -106,7 +105,6 @@ READ_DEVICE:
COPY_TO_BUFFER:
par tid := YieldToReadCache(tid);
call tid := ReadCache(tid, start, bytesRead);
- par tid := YieldToReadCache(tid);
}
procedure {:yields} WriteCache({:linear "tid"} tid': X, index: int) returns ({:linear "tid"} tid: X)