X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=threads.h;h=a379494d43bd93ee78dea0f3f0bb98dcd0af60a4;hb=74d93da009212a1d375b4fd5baede4dde82f3115;hp=9456a22f2fe4942b1004a87794fa3474eaeab26b;hpb=9ba28a8ef15225525c30c5303c859f64602820a3;p=c11tester.git diff --git a/threads.h b/threads.h index 9456a22f..a379494d 100644 --- a/threads.h +++ b/threads.h @@ -11,10 +11,7 @@ #include "mymemory.h" #include "libthreads.h" - -typedef int thread_id_t; - -#define THREAD_ID_T_NONE -1 +#include "modeltypes.h" /** @brief Represents the state of a user Thread */ typedef enum thread_state { @@ -84,6 +81,14 @@ public: */ void push_wait_list(ModelAction *act) { wait_list.push_back(act); } + unsigned int num_wait_list() { + return wait_list.size(); + } + + ModelAction * get_waiter(unsigned int i) { + return wait_list[i]; + } + ModelAction * get_pending() { return pending; } void set_pending(ModelAction *act) { pending = act; } /**