X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.h;h=7d2189b49d9f098a775b1cc158390cf76f49cbf4;hb=2866fe7049df652f89f3bfc1cc85ad65b3a150f8;hp=57319067b4adb74255435cb721d723650900153c;hpb=9ab763adc965ca76a8d65b9898d20c60cdb44445;p=model-checker.git diff --git a/threads.h b/threads.h index 5731906..7d2189b 100644 --- a/threads.h +++ b/threads.h @@ -16,6 +16,8 @@ typedef enum thread_state { THREAD_COMPLETED } thread_state; +class ModelAction; + class Thread { public: Thread(thrd_t *t, void (*func)(void *), void *a); @@ -30,11 +32,17 @@ public: thread_id_t get_id(); thrd_t get_thrd_t() { return *user_thread; } Thread * get_parent() { return parent; } - friend void thread_startup(); - MEMALLOC + + void set_creation(ModelAction *act) { creation = act; } + ModelAction * get_creation() { return creation; } + + friend void thread_startup(); + + SNAPSHOTALLOC private: int create_context(); Thread *parent; + ModelAction *creation; void (*start_routine)(void *); void *arg;