Get gdax to not crash
[c11tester.git] / pthread.cc
index 8c2bc076f3024edbc9042d428385b3dd36f77bc2..808aa207cd72338806932b3afd86c2d5abe367c6 100644 (file)
@@ -48,14 +48,16 @@ void pthread_exit(void *value_ptr) {
 }
 
 int pthread_mutex_init(pthread_mutex_t *p_mutex, const pthread_mutexattr_t *) {
+       cdsc::mutex *m = new cdsc::mutex();
+
        if (!model) {
+               snapshot_system_init(10000, 1024, 1024, 40000);
                model = new ModelChecker();
        }
 
-       cdsc::mutex *m = new cdsc::mutex();
-
        ModelExecution *execution = model->get_execution();
        execution->getMutexMap()->put(p_mutex, m);
+
        return 0;
 }