diff options
author | David Lechner <david@pybricks.com> | 2022-07-02 15:05:41 -0500 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2022-07-18 13:52:01 +1000 |
commit | a1ef5ac65db8c7509bef5d3db9ba6de9fbb4ef40 (patch) | |
tree | 399f076903d454c593df97f2bd13ba4fe1c0d13b /py/scheduler.c | |
parent | 85b4f36100aceeddd246f8b3a64436adc8dff867 (diff) | |
download | micropython-a1ef5ac65db8c7509bef5d3db9ba6de9fbb4ef40.tar.gz micropython-a1ef5ac65db8c7509bef5d3db9ba6de9fbb4ef40.zip |
py/scheduler: Use MP_REGISTER_ROOT_POINTER().
This uses MP_REGISTER_ROOT_POINTER() to register sched_queue
instead of using a conditional inside of mp_state_vm_t.
Signed-off-by: David Lechner <david@pybricks.com>
Diffstat (limited to 'py/scheduler.c')
-rw-r--r-- | py/scheduler.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/scheduler.c b/py/scheduler.c index e8ad4e4f17..db090b0991 100644 --- a/py/scheduler.c +++ b/py/scheduler.c @@ -196,6 +196,8 @@ bool mp_sched_schedule_node(mp_sched_node_t *node, mp_sched_callback_t callback) } #endif +MP_REGISTER_ROOT_POINTER(mp_sched_item_t sched_queue[MICROPY_SCHEDULER_DEPTH]); + #endif // MICROPY_ENABLE_SCHEDULER // Called periodically from the VM or from "waiting" code (e.g. sleep) to |