3 #include "threads-model.h"
6 int Fuzzer::selectWrite(ModelAction *read, SnapVector<ModelAction *> * rf_set) {
7 int random_index = random() % rf_set->size();
11 Thread * Fuzzer::selectThread(int * threadlist, int numthreads) {
12 int random_index = random() % numthreads;
13 int thread = threadlist[random_index];
14 thread_id_t curr_tid = int_to_id(thread);
15 return model->get_thread(curr_tid);
18 Thread * Fuzzer::selectNotify(action_list_t * waiters) {
19 int numwaiters = waiters->size();
20 int random_index = random() % numwaiters;
21 action_list_t::iterator it = waiters->begin();
22 advance(it, random_index);
23 Thread *thread = model->get_thread(*it);