X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=snapshotimp.h;h=2e4929d0477e4605cd5363fb86266cd054d1f3fe;hb=15fabc6f4e6591341940a8087a8dd088af59bb5c;hp=7ab009ec65c1439cc18f17bccadb31317ad2e0b0;hpb=4e47cb8620ea7deec3630a1713913850c8920a7d;p=model-checker.git diff --git a/snapshotimp.h b/snapshotimp.h index 7ab009e..2e4929d 100644 --- a/snapshotimp.h +++ b/snapshotimp.h @@ -11,7 +11,7 @@ #include #include #include -#define SHARED_MEMORY_DEFAULT (100 * ((size_t)1 << 20)) // 100mb for the shared memory +#define SHARED_MEMORY_DEFAULT (100 * ((size_t)1 << 20)) // 100mb for the shared memory #define STACK_SIZE_DEFAULT (((size_t)1 << 20) * 20) // 20 mb out of the above 100 mb for my stack #if USE_MPROTECT_SNAPSHOT @@ -53,18 +53,17 @@ struct SnapShot { unsigned int maxSnapShots; //Stores the total number of snapshots we allow }; -//Global reference to snapshot data structure -extern struct SnapShot * snapshotrecord; #else -struct Snapshot { +struct SnapShot { void *mSharedMemoryBase; void *mStackBase; size_t mStackSize; - snapshot_id mIDToRollback; + volatile snapshot_id mIDToRollback; ucontext_t mContextToRollback; snapshot_id currSnapShotID; - volatile bool mbFinalize; }; -extern struct Snapshot * sTheRecord; #endif + +//Global reference to snapshot data structure +extern struct SnapShot * snapshotrecord; #endif