6 #include "libthreads.h"
8 #define THREAD_ID_T_NONE -1
10 typedef enum thread_state {
19 Thread(thrd_t *t, void (*func)(), void *a);
24 thread_state get_state() { return state; }
25 void set_state(thread_state s) { state = s; }
27 void set_id(thread_id_t i) { *user_thread = i; }
28 thrd_t get_thrd_t() { return *user_thread; }
32 void (*start_routine)();
40 Thread *thread_current();
42 static inline thread_id_t thrd_to_id(thrd_t t)
47 #endif /* __THREADS_H__ */