Deleted Added
sdiff udiff text old ( 8332:23711432221f ) new ( 8801:1a84c6a81299 )
full compact
1/*
2 * Copyright (c) 2002-2005 The Regents of The University of Michigan
3 * Copyright (c) 2011 Advanced Micro Devices, Inc.
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 19 unchanged lines hidden (view full) ---

28 *
29 * Authors: Nathan Binkert
30 * Steve Reinhardt
31 * Gabe Black
32 */
33
34#include "base/misc.hh"
35#include "debug/TimeSync.hh"
36#include "sim/root.hh"
37
38Root *Root::_root = NULL;
39
40/*
41 * This function is called periodically by an event in M5 and ensures that
42 * at least as much real time has passed between invocations as simulated time.
43 * If not, the function either sleeps, or if the difference is small enough

--- 74 unchanged lines hidden (view full) ---

118}
119
120void
121Root::loadState(Checkpoint *cp)
122{
123 timeSyncEnable(params()->time_sync_enable);
124}
125
126Root *
127RootParams::create()
128{
129 static bool created = false;
130 if (created)
131 panic("only one root object allowed!");
132
133 created = true;
134
135 return new Root(this);
136}