8000 Ets intr lock nest by ChocolateFrogsNuts · Pull Request #6484 · esp8266/Arduino · GitHub
[go: up one dir, main page]

Skip to content

Ets intr lock nest #6484

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Sep 11, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add IRAM_ATTR to ets_intr_(un)lock and ets_post wrappers.
  • Loading branch information
ChocolateFrogsNuts committed Sep 9, 2019
commit 29da3fe04e08240885b7f0b054ebde75f501f9fe
6 changes: 3 additions & 3 deletions cores/esp8266/core_esp8266_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,14 @@ extern "C" void optimistic_yield(uint32_t interval_us) {
}
}

extern "C" void ets_intr_lock() {
extern "C" void IRAM_ATTR ets_intr_lock() {
if (ets_intr_lock_stack_ptr < ETS_INTR_LOCK_NEST_MAX)
ets_intr_lock_stack[ets_intr_lock_stack_ptr++] = xt_rsil(3);
else
xt_rsil(3);
}

extern "C" void ets_intr_unlock() {
extern "C" void IRAM_ATTR ets_intr_unlock() {
if (ets_intr_lock_stack_ptr > 0)
xt_wsr_ps(ets_intr_lock_stack[--ets_intr_lock_stack_ptr]);
else
Expand All @@ -145,7 +145,7 @@ extern "C" void ets_intr_unlock() {

extern "C" bool ets_post_rom(uint8 prio, ETSSignal sig, ETSParam par);

extern "C" bool ets_post(uint8 prio, ETSSignal sig, ETSParam par) {
extern "C" bool IRAM_ATTR ets_post(uint8 prio, ETSSignal sig, ETSParam par) {
uint32_t saved;
asm volatile ("rsr %0,ps":"=a" (saved));
bool rc=ets_post_rom(prio, sig, par);
Expand Down
0