summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/modmicropython.c2
-rw-r--r--py/mpstate.h2
-rw-r--r--py/scheduler.c8
3 files changed, 6 insertions, 6 deletions
diff --git a/py/modmicropython.c b/py/modmicropython.c
index 864d1a5c5..8d36697f1 100644
--- a/py/modmicropython.c
+++ b/py/modmicropython.c
@@ -150,7 +150,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(mp_micropython_kbd_intr_obj, mp_micropython_kbd
#if MICROPY_ENABLE_SCHEDULER
STATIC mp_obj_t mp_micropython_schedule(mp_obj_t function, mp_obj_t arg) {
if (!mp_sched_schedule(function, arg)) {
- mp_raise_msg(&mp_type_RuntimeError, "schedule stack full");
+ mp_raise_msg(&mp_type_RuntimeError, "schedule queue full");
}
return mp_const_none;
}
diff --git a/py/mpstate.h b/py/mpstate.h
index a9c2b32d6..b7eb6bdeb 100644
--- a/py/mpstate.h
+++ b/py/mpstate.h
@@ -141,7 +141,7 @@ typedef struct _mp_state_vm_t {
volatile mp_obj_t mp_pending_exception;
#if MICROPY_ENABLE_SCHEDULER
- mp_sched_item_t sched_stack[MICROPY_SCHEDULER_DEPTH];
+ mp_sched_item_t sched_queue[MICROPY_SCHEDULER_DEPTH];
#endif
// current exception being handled, for sys.exc_info()
diff --git a/py/scheduler.c b/py/scheduler.c
index 5edff45b6..e7cbb524d 100644
--- a/py/scheduler.c
+++ b/py/scheduler.c
@@ -65,7 +65,7 @@ void mp_handle_pending(void) {
void mp_handle_pending_tail(mp_uint_t atomic_state) {
MP_STATE_VM(sched_state) = MP_SCHED_LOCKED;
if (!mp_sched_empty()) {
- mp_sched_item_t item = MP_STATE_VM(sched_stack)[MP_STATE_VM(sched_idx)];
+ mp_sched_item_t item = MP_STATE_VM(sched_queue)[MP_STATE_VM(sched_idx)];
MP_STATE_VM(sched_idx) = IDX_MASK(MP_STATE_VM(sched_idx) + 1);
--MP_STATE_VM(sched_len);
MICROPY_END_ATOMIC_SECTION(atomic_state);
@@ -107,11 +107,11 @@ bool mp_sched_schedule(mp_obj_t function, mp_obj_t arg) {
MP_STATE_VM(sched_state) = MP_SCHED_PENDING;
}
uint8_t iput = IDX_MASK(MP_STATE_VM(sched_idx) + MP_STATE_VM(sched_len)++);
- MP_STATE_VM(sched_stack)[iput].func = function;
- MP_STATE_VM(sched_stack)[iput].arg = arg;
+ MP_STATE_VM(sched_queue)[iput].func = function;
+ MP_STATE_VM(sched_queue)[iput].arg = arg;
ret = true;
} else {
- // schedule stack is full
+ // schedule queue is full
ret = false;
}
MICROPY_END_ATOMIC_SECTION(atomic_state);