#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 {
*/
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; }
/**
* Remove one ModelAction from the waiting list
* @return The ModelAction that was removed from the waiting list
Thread *parent;
ModelAction *creation;
+ ModelAction *pending;
void (*start_routine)(void *);
void *arg;
ucontext_t context;