1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 386 unchanged lines hidden (view full) --- 395{ 396 return "Globals"; 397} 398 399void 400Globals::serialize(ostream &os) 401{ 402 nameOut(os); |
403 SERIALIZE_SCALAR(curTick()); |
404 405 nameOut(os, "MainEventQueue"); 406 mainEventQueue.serialize(os); 407} 408 409void 410Globals::unserialize(Checkpoint *cp) 411{ 412 const string §ion = name(); |
413 Tick tick; 414 paramIn(cp, section, "curTick", tick); 415 curTick(tick); |
416 417 mainEventQueue.unserialize(cp, "MainEventQueue"); 418} 419 420Serializable::Serializable() 421{ 422} 423 --- 106 unchanged lines hidden (view full) --- 530 531const char *Checkpoint::baseFilename = "m5.cpt"; 532 533string Checkpoint::currentDirectory; 534 535string 536Checkpoint::setDir(const string &name) 537{ |
538 // use csprintf to insert curTick() into directory name if it |
539 // appears to have a format placeholder in it. 540 currentDirectory = (name.find("%") != string::npos) ? |
541 csprintf(name, curTick()) : name; |
542 if (currentDirectory[currentDirectory.size() - 1] != '/') 543 currentDirectory += "/"; 544 return currentDirectory; 545} 546 547string 548Checkpoint::dir() 549{ --- 40 unchanged lines hidden --- |