diff --git a/core/sys/mt.c b/core/sys/mt.c index 367392960..bf3bd46e4 100644 --- a/core/sys/mt.c +++ b/core/sys/mt.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: mt.c,v 1.6 2007/05/22 20:58:14 adamdunkels Exp $ + * $Id: mt.c,v 1.7 2009/09/03 12:57:58 nvt-se Exp $ */ /** @@ -49,8 +49,6 @@ #define MT_STATE_READY 1 #define MT_STATE_RUNNING 2 -#define MT_STATE_WAITING 3 -#define MT_STATE_PEEK 4 #define MT_STATE_EXITED 5 static struct mt_thread *current; @@ -81,13 +79,11 @@ mt_start(struct mt_thread *thread, void (* function)(void *), void *data) void mt_exec(struct mt_thread *thread) { - if(thread->state == MT_STATE_READY || - thread->state == MT_STATE_PEEK) { + if(thread->state == MT_STATE_READY) { thread->state = MT_STATE_RUNNING; current = thread; /* Switch context to the thread. The function call will not return until the the thread has yielded, or is preempted. */ - /*printf("swtis\n");*/ mtarch_exec(&thread->thread); } } diff --git a/platform/cooja/sys/cooja_mt.c b/platform/cooja/sys/cooja_mt.c index 2d6e7cf5c..434a5b83c 100644 --- a/platform/cooja/sys/cooja_mt.c +++ b/platform/cooja/sys/cooja_mt.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: cooja_mt.c,v 1.1 2006/09/29 14:32:38 fros4943 Exp $ + * $Id: cooja_mt.c,v 1.2 2009/09/03 12:57:57 nvt-se Exp $ */ /* * This file is ripped from mt.c of the Contiki Multi-threading library. @@ -43,8 +43,6 @@ #define MT_STATE_READY 1 #define MT_STATE_RUNNING 2 -#define MT_STATE_WAITING 3 -#define MT_STATE_PEEK 4 #define MT_STATE_EXITED 5 static struct cooja_mt_thread *current; @@ -75,13 +73,11 @@ cooja_mt_start(struct cooja_mt_thread *thread, void (* function)(void *), void * void cooja_mt_exec(struct cooja_mt_thread *thread) { - if(thread->state == MT_STATE_READY || - thread->state == MT_STATE_PEEK) { + if(thread->state == MT_STATE_READY) { thread->state = MT_STATE_RUNNING; current = thread; /* Switch context to the thread. The function call will not return until the the thread has yielded, or is preempted. */ - /*printf("swtis\n");*/ cooja_mtarch_exec(&thread->thread); } }