- int ret;
- DBG();
- ret = model->add_thread(new Thread(t, start_routine, arg));
- DEBUG("create thread %d\n", id_to_int(thrd_to_id(*t)));
- return ret;
+ struct thread_params params = { start_routine, arg };
+ /* seq_cst is just a 'don't care' parameter */
+ model->switch_to_master(new ModelAction(THREAD_CREATE, std::memory_order_seq_cst, t, (uint64_t)¶ms));
+ return 0;