50 #define MT_STATE_READY 1
51 #define MT_STATE_RUNNING 2
52 #define MT_STATE_EXITED 5
54 static struct mt_thread *current;
70 mt_start(
struct mt_thread *thread,
void (*
function)(
void *),
void *data)
76 thread->state = MT_STATE_READY;
82 if(thread->state == MT_STATE_READY) {
83 thread->state = MT_STATE_RUNNING;
95 current->state = MT_STATE_READY;
108 current->state = MT_STATE_EXITED;