We should have a minimal set of code/declarations in the snapshot-interface.h
header. And it should not include other headers unless necessary. With this
change, the model checker code only needs to use snapshot-interface.h.
/* global "model" object */
#include "model.h"
/* global "model" object */
#include "model.h"
#include "snapshot-interface.h"
/*
#include "snapshot-interface.h"
/*
#ifndef __SNAPINTERFACE_H
#define __SNAPINTERFACE_H
#ifndef __SNAPINTERFACE_H
#define __SNAPINTERFACE_H
+
+typedef unsigned int snapshot_id;
+
+typedef void (*VoidFuncPtr)();
+void initSnapShotLibrary(unsigned int numbackingpages,
+ unsigned int numsnapshots, unsigned int nummemoryregions,
+ unsigned int numheappages, VoidFuncPtr entryPoint);
void SnapshotGlobalSegments();
void SnapshotGlobalSegments();
#ifndef _SNAPSHOT_H
#define _SNAPSHOT_H
#ifndef _SNAPSHOT_H
#define _SNAPSHOT_H
+
+#include "snapshot-interface.h"
+
#define PAGESIZE 4096
/* If USE_MPROTECT_SNAPSHOT=1, then snapshot by using mmap() and mprotect()
#define PAGESIZE 4096
/* If USE_MPROTECT_SNAPSHOT=1, then snapshot by using mmap() and mprotect()
/* Size of signal stack */
#define SIGSTACKSIZE 16384
/* Size of signal stack */
#define SIGSTACKSIZE 16384
-typedef unsigned int snapshot_id;
-
-typedef void (*VoidFuncPtr)();
-void initSnapShotLibrary(unsigned int numbackingpages,
- unsigned int numsnapshots, unsigned int nummemoryregions,
- unsigned int numheappages, VoidFuncPtr entryPoint);
-
void addMemoryRegionToSnapShot( void * ptr, unsigned int numPages );
snapshot_id takeSnapshot( );
void addMemoryRegionToSnapShot( void * ptr, unsigned int numPages );
snapshot_id takeSnapshot( );