add support for docs
[model-checker.git] / snapshot-interface.h
1 #ifndef __SNAPINTERFACE_H
2 #define __SNAPINTERFACE_H
3 #include "mymemory.h"
4
5 typedef unsigned int snapshot_id;
6
7 typedef void (*VoidFuncPtr)();
8 void initSnapShotLibrary(unsigned int numbackingpages,
9                 unsigned int numsnapshots, unsigned int nummemoryregions,
10                 unsigned int numheappages, VoidFuncPtr entryPoint);
11 void finalize();
12
13 void SnapshotGlobalSegments();
14
15 struct stackEntry {
16   struct stackEntry *next;
17   snapshot_id snapshotid;
18   int index;
19 };
20
21 class SnapshotStack {
22  public:
23   MEMALLOC
24   SnapshotStack( );
25   ~SnapshotStack();
26   int backTrackBeforeStep(int seq_index);
27   void snapshotStep(int seq_index);
28
29  private: 
30   struct stackEntry * stack;
31 };
32
33 /* Not sure what it even means to have more than one snapshot object,
34    so let's just make a global reference to it.*/
35
36 extern SnapshotStack * snapshotObject;
37 #endif