X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=snapshotimp.h;h=b03d28527e3efe69257cbf48ac1311776dbec5ee;hb=6b87c110fbda87ccec4f58b1e292d5f9434c8691;hp=e9f6d8bd50a4ab1493a8d0264c275fdfeade3b8b;hpb=06c46bd5c02bb68c1a75edc4423e5281e497c6c1;p=model-checker.git diff --git a/snapshotimp.h b/snapshotimp.h index e9f6d8b..b03d285 100644 --- a/snapshotimp.h +++ b/snapshotimp.h @@ -9,9 +9,8 @@ #include #include #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,17 +52,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; }; -extern struct Snapshot * sTheRecord; #endif + +//Global reference to snapshot data structure +extern struct SnapShot * snapshotrecord; #endif