class Thread {
public:
+ void * operator new(size_t size);
+ void operator delete(void *ptr);
Thread(thrd_t *t, void (*func)(), void *a);
- Thread(thrd_t *t);
- int swap(Thread *t);
- void dispose();
+ ~Thread();
+ void complete();
+
+ static int swap(ucontext_t *ctxt, Thread *t);
+ static int swap(Thread *t, ucontext_t *ctxt);
thread_state get_state() { return state; }
void set_state(thread_state s) { state = s; }