X-Git-Url: http://plrg.eecs.uci.edu/git/?p=c11tester.git;a=blobdiff_plain;f=fuzzer.h;h=c5248d726310b8bab5db32b80e0fccc2bbd0556a;hp=691477bd6e2e3db8833add08de8c3d5f619bd94d;hb=c8317c89922bd9555038498b363cf1574e14286f;hpb=5e7a1a00c4645f90d860274e2f25c33992c2ad86 diff --git a/fuzzer.h b/fuzzer.h index 691477bd..c5248d72 100644 --- a/fuzzer.h +++ b/fuzzer.h @@ -3,14 +3,22 @@ #include "classlist.h" #include "mymemory.h" #include "stl-model.h" +#include "threads-model.h" class Fuzzer { public: Fuzzer() {} - int selectWrite(ModelAction *read, SnapVector* rf_set); - Thread * selectThread(Node *n, int * threadlist, int numthreads); + virtual int selectWrite(ModelAction *read, SnapVector* rf_set); + virtual bool has_paused_threads() { return false; } + virtual void notify_paused_thread(Thread * thread) = 0; + virtual Thread * selectThread(int * threadlist, int numthreads); + Thread * selectNotify(action_list_t * waiters); - MEMALLOC + bool shouldSleep(const ModelAction *sleep); + bool shouldWake(const ModelAction *sleep); + virtual bool shouldWait(const ModelAction *wait) = 0; + virtual void register_engine(ModelHistory * history, ModelExecution * execution) = 0; + SNAPSHOTALLOC private: }; #endif