Skip to content

Commit 3b0fbfe

Browse files
committed
cc3200/mpthreadport: Properly initialise the main thread's data.
1 parent 2724129 commit 3b0fbfe

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

cc3200/mpthreadport.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "py/mpstate.h"
3131
#include "py/gc.h"
3232
#include "py/mpthread.h"
33+
#include "mptask.h"
3334
#include "task.h"
3435

3536
#if MICROPY_PY_THREAD
@@ -55,9 +56,11 @@ void mp_thread_init(void) {
5556

5657
// create first entry in linked list of all threads
5758
thread = &thread_entry0;
58-
thread->id = NULL; // TODO
59+
thread->id = xTaskGetCurrentTaskHandle();
5960
thread->ready = 1;
6061
thread->arg = NULL;
62+
thread->stack = mpTaskStack;
63+
thread->stack_len = MICROPY_TASK_STACK_LEN;
6164
thread->next = NULL;
6265
}
6366

0 commit comments

Comments
 (0)