Fix a bug in pthread_mutex_unlock; initialize mutex if necessary when pthread_mutex_t...
[c11tester.git] / fuzzer.h
1 #ifndef FUZZER_H
2 #define FUZZER_H
3 #include "classlist.h"
4 #include "mymemory.h"
5 #include "stl-model.h"
6 #include "threads-model.h"
7
8 class Fuzzer {
9 public:
10         Fuzzer() {}
11         virtual int selectWrite(ModelAction *read, SnapVector<ModelAction *>* rf_set);
12         virtual Predicate * get_selected_child_branch(thread_id_t tid) = 0;
13         virtual bool has_paused_threads() { return false; }
14         virtual Thread * selectThread(int * threadlist, int numthreads);
15         Thread * selectNotify(action_list_t * waiters);
16         bool shouldSleep(const ModelAction *sleep);
17         bool shouldWake(const ModelAction *sleep);
18         virtual bool shouldWait(const ModelAction *wait) = 0;
19         virtual void register_engine(ModelHistory * history, ModelExecution * execution) = 0;
20         SNAPSHOTALLOC
21 private:
22 };
23 #endif