trying to get fork based snapshotting to work
[model-checker.git] / snapshot.h
1 /** @file snapshot.h
2  *      @brief Snapshotting interface header file.
3  */
4
5 #ifndef _SNAPSHOT_H
6 #define _SNAPSHOT_H
7
8 #include "snapshot-interface.h"
9
10 #define PAGESIZE 4096
11
12 /* If USE_MPROTECT_SNAPSHOT=1, then snapshot by using mmap() and mprotect()
13    If USE_MPROTECT_SNAPSHOT=0, then snapshot by using fork() */
14 #define USE_MPROTECT_SNAPSHOT 1
15
16 /* Size of signal stack */
17 #define SIGSTACKSIZE 32768
18
19 void addMemoryRegionToSnapShot( void * ptr, unsigned int numPages );
20 snapshot_id takeSnapshot( );
21 void rollBack( snapshot_id theSnapShot );
22
23 #if !USE_MPROTECT_SNAPSHOT
24 void createSharedMemory();
25 #endif
26
27 #endif