more documentation
[c11tester.git] / snapshotimp.h
index c28b4ebf015ff0b89acf46700288d353263a66f9..b918b8447b9b6f77b8b633ecdd835185997ddaa8 100644 (file)
@@ -1,3 +1,7 @@
+/** @file snapshotimp.h
+ *     @brief Snapshotting implementation header file..
+ */
+
 #ifndef _SNAPSHOTIMP_H
 #define _SNAPSHOTIMP_H
 #include "snapshot.h"
@@ -10,7 +14,7 @@
 #define SHARED_MEMORY_DEFAULT ( 100 * ( 1 << 20 ) ) // 100mb for the shared memory
 #define STACK_SIZE_DEFAULT  ( ( 1 << 20 ) * 20 ) //20 mb out of the above 100 mb for my stack.
 
-#if USE_CHECKPOINTING
+#if USE_MPROTECT_SNAPSHOT
 //Each snapshotrecord lists the firstbackingpage that must be written to revert to that snapshot
 struct SnapShotRecord {
   unsigned int firstBackingPage;
@@ -52,6 +56,7 @@ struct SnapShot {
 //Global reference to snapshot data structure
 extern struct SnapShot * snapshotrecord;
 void * ReturnPageAlignedAddress( void *);
+void * PageAlignAddressUpward( void *);
 #else
 struct Snapshot_t{
 char *mSharedMemoryBase;
@@ -60,9 +65,6 @@ size_t mStackSize;
 snapshot_id mIDToRollback;
 ucontext_t mContextToRollback;
 snapshot_id currSnapShotID;
-#if DEBUG
-struct timeval startTimeGlobal;
-#endif
 volatile bool mbFinalize;
 };
 extern struct Snapshot_t * sTheRecord;