int pthread_mutex_init(pthread_mutex_t *p_mutex, const pthread_mutexattr_t *) {
cdsc::mutex *m = new cdsc::mutex();
- ModelExecution *execution;
if (!model) {
- if (!model_init) {
- snapshot_system_init(10000, 1024, 1024, 40000);
- model_init = new ModelChecker();
- }
- execution = model_init->get_execution();
- } else
- execution = model->get_execution();
+ snapshot_system_init(10000, 1024, 1024, 40000);
+ model = new ModelChecker();
+ }
+
+ ModelExecution *execution = model->get_execution();
execution->getMutexMap()->put(p_mutex, m);
return 0;