X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=pthread.cc;h=9a222b9d85a24bccb70d04a92d549bebf5f9a33c;hp=4f2dcd0ee7e00665274c239533234cb31499bc6c;hb=fa4c0d65d9c72d08d28e604a3eaa2fd82a9c6b20;hpb=0dbf7f2dd8d6cb6ffdbb5ffaf6329e9ca4b8d913 diff --git a/pthread.cc b/pthread.cc index 4f2dcd0e..9a222b9d 100644 --- a/pthread.cc +++ b/pthread.cc @@ -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,17 @@ 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(); + model->startChecker(); } - cdsc::mutex *m = new cdsc::mutex(); - ModelExecution *execution = model->get_execution(); execution->getMutexMap()->put(p_mutex, m); + return 0; }