From 330165a2cc9a0d4d5d00f13f851412c25d5f4ed2 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 22 Apr 2016 22:44:56 +0000 Subject: py: Add MP_STATE_THREAD to hold state specific to a given thread. --- unix/gccollect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'unix/gccollect.c') 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*)®s; - gc_collect_root(regs_ptr, ((uintptr_t)MP_STATE_VM(stack_top) - (uintptr_t)®s) / sizeof(uintptr_t)); + gc_collect_root(regs_ptr, ((uintptr_t)MP_STATE_THREAD(stack_top) - (uintptr_t)®s) / sizeof(uintptr_t)); #if MICROPY_EMIT_NATIVE mp_unix_mark_exec(); #endif -- cgit v1.2.3