40 #include "sys/cooja_mt.h" 43 #define MT_STATE_READY 1 44 #define MT_STATE_RUNNING 2 45 #define MT_STATE_EXITED 5 47 static struct cooja_mt_thread *current;
51 cooja_mt_start(
struct cooja_mt_thread *thread,
void (*
function)(
void *),
void *data)
55 cooja_mtarch_start(&thread->thread,
function, data);
57 thread->state = MT_STATE_READY;
61 cooja_mt_exec(
struct cooja_mt_thread *thread)
63 if(thread->state == MT_STATE_READY) {
64 thread->state = MT_STATE_RUNNING;
68 cooja_mtarch_exec(&thread->thread);
75 current->state = MT_STATE_READY;
Default definitions of C compiler quirk work-arounds.