Skip to content

Commit e786dc2

Browse files
committed
Branch had become mangled with lots of unrelated changes - reduced to core changeset.
1 parent 5d609fd commit e786dc2

File tree

5 files changed

+28
-11
lines changed

5 files changed

+28
-11
lines changed

cores/esp8266/core_esp8266_main.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
//This may be used to change user task stack size:
2424
//#define CONT_STACKSIZE 4096
2525
#include <Arduino.h>
26-
#include "Schedule.h"
2726
extern "C" {
2827
#include "ets_sys.h"
2928
#include "os_type.h"
@@ -90,13 +89,12 @@ void preloop_update_frequency() {
9089
#endif
9190
}
9291

93-
94-
static inline void esp_yield_within_cont() __attribute__((always_inline));
95-
static void esp_yield_within_cont() {
92+
extern "C" void __esp_yield_within_cont() {
9693
cont_yield(g_pcont);
97-
run_scheduled_recurrent_functions();
9894
}
9995

96+
extern "C" void esp_yield_within_cont() __attribute__ ((weak, alias("__esp_yield_within_cont")));
97+
10098
extern "C" void esp_yield() {
10199
if (cont_can_yield(g_pcont)) {
102100
esp_yield_within_cont();
@@ -159,8 +157,6 @@ extern "C" bool IRAM_ATTR ets_post(uint8 prio, ETSSignal sig, ETSParam par) {
159157

160158
extern "C" void __loop_end (void)
161159
{
162-
run_scheduled_functions();
163-
run_scheduled_recurrent_functions();
164160
}
165161

166162
extern "C" void loop_end (void) __attribute__ ((weak, alias("__loop_end")));

libraries/Schedule/library.properties

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name=Schedule
2+
version=1.0
3+
author=Earle F. Philhower, III <[email protected]>
4+
maintainer=Earle F. Philhower, III <[email protected]>
5+
sentence=
6+
paragraph=
7+
category=Other
8+
url=https://github.com/esp8266/Arduino
9+
architectures=esp8266
10+
dot_a_linkage=true

cores/esp8266/Schedule.cpp renamed to libraries/Schedule/src/Schedule.cpp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,20 @@
22
#include <assert.h>
33

44
#include "Schedule.h"
5-
#include "PolledTimeout.h"
6-
#include "interrupts.h"
7-
#include "coredecls.h"
5+
#include <PolledTimeout.h>
6+
#include <interrupts.h>
7+
#include <coredecls.h>
8+
9+
extern "C" void loop_end()
10+
{
11+
run_scheduled_functions();
12+
run_scheduled_recurrent_functions();}
13+
14+
extern "C" void esp_yield_within_cont()
15+
{
16+
cont_yield(g_pcont);
17+
run_scheduled_recurrent_functions();
18+
}
819

920
typedef std::function<void(void)> mSchedFuncT;
1021
struct scheduled_fn_t
File renamed without changes.

tests/host/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ CORE_CPP_FILES := $(addprefix $(CORE_PATH)/,\
6767
spiffs/spiffs_nucleus.cpp \
6868
libb64/cencode.cpp \
6969
libb64/cdecode.cpp \
70-
Schedule.cpp \
70+
../../libraries/Schedule/src/Schedule.cpp \
7171
HardwareSerial.cpp \
7272
crc32.cpp \
7373
) \

0 commit comments

Comments
 (0)