sc_spawn.cc (13129:7346c328de41) sc_spawn.cc (13131:bf07048d69e4)
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

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

55
56 if (!name || name[0] == '\0') {
57 if (method)
58 name = ::sc_core::sc_gen_unique_name("method_p");
59 else
60 name = ::sc_core::sc_gen_unique_name("thread_p");
61 }
62
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

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

55
56 if (!name || name[0] == '\0') {
57 if (method)
58 name = ::sc_core::sc_gen_unique_name("method_p");
59 else
60 name = ::sc_core::sc_gen_unique_name("thread_p");
61 }
62
63 bool dynamic =
64 (::sc_core::sc_get_status() >
65 ::sc_core::SC_BEFORE_END_OF_ELABORATION);
66
67 Process *proc;
68 if (method)
63 Process *proc;
64 if (method)
69 proc = new Method(name, func, dynamic);
65 proc = new Method(name, func);
70 else
66 else
71 proc = new Thread(name, func, dynamic);
67 proc = new Thread(name, func);
72
73 if (opts) {
74 for (auto e: opts->_events)
75 proc->addStatic(new PendingSensitivityEvent(proc, e));
76
77 for (auto p: opts->_ports)
78 proc->addStatic(new PendingSensitivityPort(proc, p));
79

--- 150 unchanged lines hidden ---
68
69 if (opts) {
70 for (auto e: opts->_events)
71 proc->addStatic(new PendingSensitivityEvent(proc, e));
72
73 for (auto p: opts->_ports)
74 proc->addStatic(new PendingSensitivityPort(proc, p));
75

--- 150 unchanged lines hidden ---