X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.h;h=e52c324eb0fb81119d8063625c21387443105b18;hb=5b22024b3c5e054ed1861e90b47f28c5698fb3e1;hp=b592804db95959445d5c4f967f449121e2d59bad;hpb=1d6c949fef3b5da936f8499dde464f8df634267a;p=model-checker.git diff --git a/threads.h b/threads.h index b592804..e52c324 100644 --- a/threads.h +++ b/threads.h @@ -18,7 +18,7 @@ typedef enum thread_state { 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 +30,15 @@ public: thread_id_t get_id(); thrd_t get_thrd_t() { return *user_thread; } Thread * get_parent() { return parent; } - MEMALLOC + + friend void thread_startup(); + + SNAPSHOTALLOC private: int create_context(); Thread *parent; - void (*start_routine)(); + void (*start_routine)(void *); void *arg; ucontext_t context; void *stack;