trick/include/trick/DMTCP.hh
Alex Lin 19025d77ad Standardize directory names
Reorganized.  Created a new top level include directory that will hold all of Trick's header files. Moved all of the Trick headers to this directory.  Created a libexec directory that holds all of the executables that users don't need to execute directly.  Changed all of the executables remaining in bin to start with "trick-".  In the sim_services directories changed all source files to find the Trick headers in their new location.  Since all of the include files are gone in sim_services, removed the src directories as well, moving all of the source files up a level.  Moved the makefiles, docs, man, and other architecture independent files into a top level share directory.  Renamed lib_${TRICK_HOST_CPU} to lib64 or lib depending on the platform we're currently on.

refs #63
2015-06-09 08:44:42 -05:00

69 lines
1.9 KiB
C++

/*
PURPOSE:
(DMTCP)
*/
#ifndef DMTCP_HH
#define DMTCP_HH
#ifdef _DMTCP
#include "dmtcpaware.h"
#endif
#include <queue>
#include "trick/dmtcp_checkpoint_c_intf.hh"
#include "trick/Scheduler.hh"
namespace Trick {
class DMTCP : public Trick::Scheduler {
public:
DMTCP() ;
int init() ;
int freeze() ;
int pre() ;
int post() ;
int restart() ;
int call_dmtcp();
void dmtcpSetCheckpointNow() ;
void dmtcpJobQueue( std::string file_name );
void renameRestartScript();
void dmtcpSystemCmd( const std::string& str );
void dmtcpCleanup();
void dmtcpSafestoreDir();
void dmtcpRenameCmd();
bool isSpecialCharacter( const std::string& str );
std::string getScriptName();
std::string splitFilename( const std::string& str );
unsigned int dmtcp_ckpt_complete;
std::priority_queue<std::string> dmtcp_checkpoint_jobs_queue ;
virtual int write_s_job_execution( FILE * fp ) ;
virtual int instrument_job_before(Trick::JobData * instrument_job) ;
virtual int instrument_job_after(Trick::JobData * instrument_job) ;
virtual int instrument_job_remove(std::string in_job) ;
private:
bool checkpoint_now ;
char prev_checkpoint_dirname[1024] ;
/** queue to hold jobs to be called before a checkpoint is dumped. */
Trick::ScheduledJobQueue pre_queue ; /* ** */
/** queue to hold jobs to be called after a checkpoint is dumped. */
Trick::ScheduledJobQueue post_queue ; /* ** */
/** queue to hold jobs to be called after a checkpoint is reloaded. */
Trick::ScheduledJobQueue restart_queue ; /* ** */
} ;
}
#endif