Skip to content

Commit de87232

Browse files
committed
fix compilation issues
1 parent 02923aa commit de87232

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

concurrency/framework/DiskExtern.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,15 @@ namespace InstantiatedDiskInterface {
7575
}
7676
}
7777

78+
inline void sync__write(Ptrs::Ptr buf, uint64 nbytes, int64_t offset)
79+
{
80+
int ret = pwrite(fd, (void*)buf.ptr, nbytes, offset * 4096);
81+
if (ret != nbytes) {
82+
std::cerr << "pwrite failed " << ret << std::endl;
83+
exit(1);
84+
}
85+
}
86+
7887
inline Ptrs::Ptr get__event(IOCtx& ioctx) {
7988
struct io_event event;
8089
int status = io_getevents(*ioctx.ctx, 0, 1, &event, NULL);

concurrency/scache/cache/CacheSM.i.dfy

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -409,15 +409,15 @@ module CacheSSM refines DiskSSM(CacheIfc) {
409409
}
410410

411411
datatype Step =
412-
| StartReadStep(cache_idx: nat, disk_idx: nat)
413-
| FinishReadStep(cache_idx: nat, disk_idx: nat)
414-
| StartWritebackStep(cache_idx: nat)
415-
| FinishWritebackStep(cache_idx: nat)
416-
| EvictStep(cache_idx: nat)
417-
| ObserveCleanForSyncStep(cache_idx: nat, rid: RequestId)
418-
| ApplyReadStep(cache_idx: nat, rid: RequestId)
419-
| ApplyWriteStep(cache_idx: nat, rid: RequestId)
420-
| MarkDirtyStep(cache_idx: nat)
412+
| StartReadStep(ghost cache_idx: nat, ghost disk_idx: nat)
413+
| FinishReadStep(ghost cache_idx: nat, ghost disk_idx: nat)
414+
| StartWritebackStep(ghost cache_idx: nat)
415+
| FinishWritebackStep(ghost cache_idx: nat)
416+
| EvictStep(ghost cache_idx: nat)
417+
| ObserveCleanForSyncStep(ghost cache_idx: nat, ghost rid: RequestId)
418+
| ApplyReadStep(ghost cache_idx: nat, ghost rid: RequestId)
419+
| ApplyWriteStep(ghost cache_idx: nat, ghost rid: RequestId)
420+
| MarkDirtyStep(ghost cache_idx: nat)
421421

422422
predicate InternalStep(shard: M, shard': M, step: Step)
423423
{

0 commit comments

Comments
 (0)