snapshot: rename USE_CHECKPOINTING to USE_MPROTECT_SNAPSHOT
[model-checker.git] / snapshot.h
1 #ifndef _SNAPSHOT_H
2 #define _SNAPSHOT_H
3 #define PAGESIZE 4096
4
5 /* If USE_MPROTECT_SNAPSHOT=1, then snapshot by using mmap() and mprotect()
6    If USE_MPROTECT_SNAPSHOT=0, then snapshot by using fork() */
7 #define USE_MPROTECT_SNAPSHOT 1
8
9 /* Size of signal stack */
10 #define SIGSTACKSIZE 16384
11
12
13 typedef unsigned int snapshot_id;
14 typedef void (*MyFuncPtr)();
15 void initSnapShotLibrary(unsigned int numbackingpages, unsigned int numsnapshots, unsigned int nummemoryregions, unsigned int numheappages, MyFuncPtr entryPoint);
16
17 void addMemoryRegionToSnapShot( void * ptr, unsigned int numPages );
18
19 snapshot_id takeSnapshot( );
20
21 void rollBack( snapshot_id theSnapShot );
22
23 void finalize();
24
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 void createSharedLibrary();
29 #ifdef __cplusplus
30 };  /* end of extern "C" */
31 #endif
32 #endif