diff options
author | Andrew Leech <andrew.leech@planetinnovation.com.au> | 2019-03-21 11:52:10 +1100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2019-03-26 16:35:42 +1100 |
commit | 8977c7eb581f5d06500edb1ea29aea5cbda04f28 (patch) | |
tree | 10291cc81c84a9eb0732367c613c35511be4ee48 /py/mpstate.h | |
parent | 2befcb8a9d54f3f9c059b45eba3e9d4e5fb13514 (diff) |
py/scheduler: Convert micropythyon.schedule() to a circular buffer.
This means the schedule operates on a first-in, first-executed manner
rather than the current last-in, first executed.
Diffstat (limited to 'py/mpstate.h')
-rw-r--r-- | py/mpstate.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 149660040..a9c2b32d6 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -209,7 +209,8 @@ typedef struct _mp_state_vm_t { #if MICROPY_ENABLE_SCHEDULER volatile int16_t sched_state; - uint16_t sched_sp; + uint8_t sched_len; + uint8_t sched_idx; #endif #if MICROPY_PY_THREAD_GIL |