esp8266/ets_alt_task: Don't run ets_loop_iter if irqs are disabled.
ets_loop_iter processes pending tasks, and tasks are considered lower priority than interrupts, so tasks shouldn't be processed if interrupts are disabled.
This commit is contained in:
parent
99b14593a6
commit
849eb835f0
@ -1,4 +1,5 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include "xtirq.h"
|
||||||
#include "osapi.h"
|
#include "osapi.h"
|
||||||
#include "os_type.h"
|
#include "os_type.h"
|
||||||
#include "ets_sys.h"
|
#include "ets_sys.h"
|
||||||
@ -108,6 +109,9 @@ bool ets_post(uint8 prio, os_signal_t sig, os_param_t param) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool ets_loop_iter(void) {
|
bool ets_loop_iter(void) {
|
||||||
|
if (query_irq() != 0) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
//static unsigned cnt;
|
//static unsigned cnt;
|
||||||
bool progress = false;
|
bool progress = false;
|
||||||
for (volatile struct task_entry *t = emu_tasks; t < &emu_tasks[MP_ARRAY_SIZE(emu_tasks)]; t++) {
|
for (volatile struct task_entry *t = emu_tasks; t < &emu_tasks[MP_ARRAY_SIZE(emu_tasks)]; t++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user