Quantcast
Channel: SystemC Language Forum RSS Feed
Viewing all articles
Browse latest Browse all 595

How SC_FORK and SC_JOIN implemented ?

$
0
0

Hi All,

 

How sc_fork and sc_join is internally implemented? in below code control will not come to end of file.

 

SC_MODULE(top) {

       void run() {

            cout " run: before fork/join" << endl;

     

            SC_FORK

            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 :

run:before fork/join

 

 

question : why after fork/join is not printed in this case?

 


Viewing all articles
Browse latest Browse all 595

Trending Articles