diff options
Diffstat (limited to 'main.c')
| -rwxr-xr-x | main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -45,6 +45,7 @@ #include "background.h" #include "mpconfigboard.h" +#include "supervisor/background_callback.h" #include "supervisor/cpu.h" #include "supervisor/memory.h" #include "supervisor/port.h" @@ -100,8 +101,6 @@ void start_mp(supervisor_allocation* heap) { reset_status_led(); autoreload_stop(); - background_tasks_reset(); - // Stack limit should be less than real stack size, so we have a chance // to recover from limit hit. (Limit is measured in bytes.) mp_stack_ctrl_init(); @@ -161,6 +160,8 @@ void stop_mp(void) { MP_STATE_VM(vfs_cur) = vfs; #endif + background_callback_reset(); + gc_deinit(); } @@ -492,6 +493,8 @@ void gc_collect(void) { // have lost their references in the VM even though they are mounted. gc_collect_root((void**)&MP_STATE_VM(vfs_mount_table), sizeof(mp_vfs_mount_t) / sizeof(mp_uint_t)); + background_callback_gc_collect(); + #if CIRCUITPY_DISPLAYIO displayio_gc_collect(); #endif |
