py/scheduler: Rename sched_stack to sched_queue.

Behaviour was changed from stack to queue in
8977c7eb58, and this updates variable names
to match.  Also updates other references (docs, error messages).
This commit is contained in:
Jim Mussared
2019-07-11 11:55:31 +10:00
committed by Damien George
parent 3e55830066
commit bc66fe9064
4 changed files with 8 additions and 8 deletions

View File

@@ -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);