Skip to content

Commit b135070

Browse files
committed
Move some core functions back into RAM
1 parent 5d251b1 commit b135070

File tree

2 files changed

+153
-153
lines changed

2 files changed

+153
-153
lines changed

hardware/esp8266com/esp8266/cores/esp8266/cont_util.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,20 @@
2525

2626
#define CONT_STACKGUARD 0xfeefeffe
2727

28-
void cont_init(cont_t* cont) {
28+
void ICACHE_RAM_ATTR cont_init(cont_t* cont) {
2929
cont->stack_guard1 = CONT_STACKGUARD;
3030
cont->stack_guard2 = CONT_STACKGUARD;
3131
cont->stack_end = cont->stack + (sizeof(cont->stack) / 4);
3232
cont->struct_start = (unsigned*) cont;
3333
}
3434

35-
int cont_check(cont_t* cont) {
35+
int ICACHE_RAM_ATTR cont_check(cont_t* cont) {
3636
if(cont->stack_guard1 != CONT_STACKGUARD || cont->stack_guard2 != CONT_STACKGUARD) return 1;
3737

3838
return 0;
3939
}
4040

41-
bool cont_can_yield(cont_t* cont) {
41+
bool ICACHE_RAM_ATTR cont_can_yield(cont_t* cont) {
4242
return !ETS_INTR_WITHINISR() &&
4343
cont->pc_ret != 0 && cont->pc_yield == 0;
4444
}

0 commit comments

Comments
 (0)