X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=snapshotimp.h;h=0560203f1dc8e358312d9b3cfc30040e4a6fb225;hb=ac8e176cd4a8756244c12dbbcaf961d27bfc8a74;hp=e9f6d8bd50a4ab1493a8d0264c275fdfeade3b8b;hpb=f3ef22bef8d339c7d45b7d7232cdcf183a0b7776;p=model-checker.git diff --git a/snapshotimp.h b/snapshotimp.h index e9f6d8b..0560203 100644 --- a/snapshotimp.h +++ b/snapshotimp.h @@ -2,16 +2,14 @@ * @brief Snapshotting implementation header file.. */ -#ifndef _SNAPSHOTIMP_H -#define _SNAPSHOTIMP_H +#ifndef __SNAPSHOTIMP_H__ +#define __SNAPSHOTIMP_H__ + +#include + #include "snapshot.h" -#include -#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 +51,21 @@ 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 { + +#include + +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 #endif + +//Global reference to snapshot data structure +extern struct SnapShot * snapshotrecord; + +#endif /* __SNAPSHOTIMP_H__ */