summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-05-31 17:30:07 +0100
committerDamien George <damien.p.george@gmail.com>2016-06-28 11:28:52 +0100
commit3b0fbfe4e598db9673f1febbbc6df072ebcd8549 (patch)
treede9f47bd1090ce27889ed0a466eb19ace050459e
parent27241293c4f5ae26927f70fe03cdd86fa1819aa1 (diff)
downloadmicropython-3b0fbfe4e598db9673f1febbbc6df072ebcd8549.tar.gz
micropython-3b0fbfe4e598db9673f1febbbc6df072ebcd8549.zip
cc3200/mpthreadport: Properly initialise the main thread's data.
-rw-r--r--cc3200/mpthreadport.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cc3200/mpthreadport.c b/cc3200/mpthreadport.c
index 5fe14a6ed8..ffeba2947e 100644
--- a/cc3200/mpthreadport.c
+++ b/cc3200/mpthreadport.c
@@ -30,6 +30,7 @@
#include "py/mpstate.h"
#include "py/gc.h"
#include "py/mpthread.h"
+#include "mptask.h"
#include "task.h"
#if MICROPY_PY_THREAD
@@ -55,9 +56,11 @@ void mp_thread_init(void) {
// create first entry in linked list of all threads
thread = &thread_entry0;
- thread->id = NULL; // TODO
+ thread->id = xTaskGetCurrentTaskHandle();
thread->ready = 1;
thread->arg = NULL;
+ thread->stack = mpTaskStack;
+ thread->stack_len = MICROPY_TASK_STACK_LEN;
thread->next = NULL;
}