1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
--- 29 unchanged lines hidden (view full) ---
38{
39
40namespace
41{
42
43std::list<Module *> _modules;
44Module *_new_module;
45
46} // anonymous namespace
47
48Module::Module(const char *name) : _name(name), _sc_mod(nullptr), _obj(nullptr)
49{
50 panic_if(_new_module, "Previous module not finished.\n");
51 _new_module = this;
52}
53
--- 31 unchanged lines hidden (view full) ---
85}
86
87Module *
88newModule()
89{
90 return _new_module;
91}
92
93std::set<Module *> allModules;
94
95} // namespace sc_gem5
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright
--- 29 unchanged lines hidden (view full) ---
38{
39
40namespace
41{
42
43std::list<Module *> _modules;
44Module *_new_module;
45
46} // anonymous namespace
47
48Module::Module(const char *name) : _name(name), _sc_mod(nullptr), _obj(nullptr)
49{
50 panic_if(_new_module, "Previous module not finished.\n");
51 _new_module = this;
52}
53
--- 31 unchanged lines hidden (view full) ---
85}
86
87Module *
88newModule()
89{
90 return _new_module;
91}
92
93std::set<Module *> allModules;
94
95} // namespace sc_gem5