threads: don't call the userprogram interface for initial thread, just create it
authorBrian Norris <banorris@uci.edu>
Wed, 2 May 2012 23:57:06 +0000 (16:57 -0700)
committerBrian Norris <banorris@uci.edu>
Wed, 2 May 2012 23:57:06 +0000 (16:57 -0700)
This will help once I start model-checking thrd_create().

threads.cc

index d799144f67e1df86dcaacaa217da2f3f799b5cdd..e0cb277563bb057c989be29379866ac8f090094b 100644 (file)
@@ -152,7 +152,7 @@ int main()
 
        do {
                /* Start user program */
-               thrd_create(&user_thread, &user_main, NULL);
+               model->add_thread(new Thread(&user_thread, &user_main, NULL));
 
                /* Wait for all threads to complete */
                thread_wait_finish();