/** @brief A Thread is created for each user-space thread */
class Thread {
public:
+ Thread(thread_id_t tid);
Thread(thrd_t *t, void (*func)(void *), void *a);
~Thread();
void complete();
return ret;
}
+ bool is_model_thread() { return model_thread; }
+
friend void thread_startup();
SNAPSHOTALLOC
* list is used for thread joins, where another Thread waits for this
* Thread to complete
*/
- std::vector<ModelAction *> wait_list;
+ std::vector< ModelAction *, SnapshotAlloc<ModelAction *> > wait_list;
/**
* The value returned by the last action in this thread
* @see Thread::get_return_value()
*/
uint64_t last_action_val;
+
+ /** @brief Is this Thread a special model-checker thread? */
+ const bool model_thread;
};
Thread * thread_current();