if i have a spawned process inside fork/join and property is set to dont_initialize.
SC_MODULE(top) {
void fun() {
cout " =========== fun========" << endl;
}
sc_spawn_options opt;
void run() {
opt.dont_initialize();
cout " run: before fork/join" << endl;
SC_FORK
sc_spawn(sc_bind(&top::fun, this), "d1", &opt),
SC_JOIN
cout << "run: after fork/join" << endl;
}
SC_CTOR(top) {
SC_THREAD(run);
}
};
int sc_main(int argc, char **argv) {
top top_1("top_1);
sc_start();
return 0;
}
output :
before fork/join
================= fun ===============
question :
i have spawned process inside fork and join still the statement "after fork/join " is not printed.how ?