summaryrefslogtreecommitdiffstatshomepage
path: root/unix/gccollect.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-04-22 22:44:56 +0000
committerDamien George <damien.p.george@gmail.com>2016-06-28 11:09:31 +0100
commit330165a2cc9a0d4d5d00f13f851412c25d5f4ed2 (patch)
tree51e3fb1500e57441899d914f85e69a8436bfe81b /unix/gccollect.c
parent3545ef8bb49d9ad02e85bd13f478072f8059c582 (diff)
downloadmicropython-330165a2cc9a0d4d5d00f13f851412c25d5f4ed2.tar.gz
micropython-330165a2cc9a0d4d5d00f13f851412c25d5f4ed2.zip
py: Add MP_STATE_THREAD to hold state specific to a given thread.
Diffstat (limited to 'unix/gccollect.c')
-rw-r--r--unix/gccollect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/unix/gccollect.c b/unix/gccollect.c
index 125c273a30..7e8fe456a1 100644
--- a/unix/gccollect.c
+++ b/unix/gccollect.c
@@ -144,7 +144,7 @@ void gc_collect(void) {
gc_helper_get_regs(regs);
// GC stack (and regs because we captured them)
void **regs_ptr = (void**)(void*)&regs;
- gc_collect_root(regs_ptr, ((uintptr_t)MP_STATE_VM(stack_top) - (uintptr_t)&regs) / sizeof(uintptr_t));
+ gc_collect_root(regs_ptr, ((uintptr_t)MP_STATE_THREAD(stack_top) - (uintptr_t)&regs) / sizeof(uintptr_t));
#if MICROPY_EMIT_NATIVE
mp_unix_mark_exec();
#endif