X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.h;h=7d2189b49d9f098a775b1cc158390cf76f49cbf4;hb=9397658596cfa29f81242b5f06e80d1d9cdf6d14;hp=b592804db95959445d5c4f967f449121e2d59bad;hpb=810306cb85accaaace9a50f174264f105991230b;p=c11tester.git diff --git a/threads.h b/threads.h index b592804d..7d2189b4 100644 --- a/threads.h +++ b/threads.h @@ -16,9 +16,11 @@ typedef enum thread_state { THREAD_COMPLETED } thread_state; +class ModelAction; + class Thread { public: - Thread(thrd_t *t, void (*func)(), void *a); + Thread(thrd_t *t, void (*func)(void *), void *a); ~Thread(); void complete(); @@ -30,12 +32,19 @@ public: thread_id_t get_id(); thrd_t get_thrd_t() { return *user_thread; } Thread * get_parent() { return parent; } - 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 (*start_routine)(void *); void *arg; ucontext_t context; void *stack;