X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=snapshotimp.h;h=b03d28527e3efe69257cbf48ac1311776dbec5ee;hp=e9f6d8bd50a4ab1493a8d0264c275fdfeade3b8b;hb=99cf3d542dfda51e082db5058af0bf178ed9c464;hpb=cf7518cb8c2d9cd3033ca7540ea9dc448b21912a diff --git a/snapshotimp.h b/snapshotimp.h index e9f6d8bd..b03d2852 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