Get gdax to not crash
[c11tester.git] / pthread.cc
index 4f2dcd0ee7e00665274c239533234cb31499bc6c..808aa207cd72338806932b3afd86c2d5abe367c6 100644 (file)
@@ -1,7 +1,7 @@
 #include "common.h"
 #include "threads-model.h"
 #include "action.h"
-#include "pthread.h"
+#include "mypthread.h"
 
 #include "snapshot-interface.h"
 #include "datarace.h"
@@ -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;
 }