Deleted Added
sdiff udiff text old ( 13091:81fceed26e1e ) new ( 13135:4bb2f323fb1a )
full compact
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

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

23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include <memory>
31#include <vector>
32
33#include "base/logging.hh"
34#include "systemc/core/kernel.hh"
35#include "systemc/core/module.hh"
36#include "systemc/core/process_types.hh"
37#include "systemc/ext/core/sc_module.hh"
38#include "systemc/ext/core/sc_module_name.hh"
39
40namespace sc_gem5
41{
42
43Process *
44newMethodProcess(const char *name, ProcessFuncWrapper *func)
45{
46 Process *p = new Method(name, func);
47 scheduler.reg(p);
48 return p;
49}
50
51Process *
52newThreadProcess(const char *name, ProcessFuncWrapper *func)
53{
54 Process *p = new Thread(name, func);
55 scheduler.reg(p);
56 return p;
57}
58
59Process *
60newCThreadProcess(const char *name, ProcessFuncWrapper *func)
61{
62 Process *p = new CThread(name, func);
63 scheduler.reg(p);
64 p->dontInitialize();
65 return p;
66}
67
68UniqueNameGen nameGen;
69
70} // namespace sc_gem5

--- 636 unchanged lines hidden ---