File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -54,5 +54,8 @@ extern "C" {
5454
5555 extern void __freertos_idle_other_core () __attribute__((weak ));
5656 extern void __freertos_resume_other_core () __attribute__((weak ));
57+
58+ extern void __freertos_task_exit_critical () __attribute__((weak ));
59+ extern void __freertos_task_enter_critical () __attribute__((weak ));
5760}
5861extern SemaphoreHandle_t __get_freertos_mutex_for_ptr (mutex_t * m , bool recursive = false);
Original file line number Diff line number Diff line change 2323#include < hardware/gpio.h>
2424#include < hardware/sync.h>
2525#include < map>
26+ #include " _freertos.h"
2627
27- // FreeRTOS potential includes
28- extern void taskEXIT_CRITICAL () __attribute__((weak));
29- extern void taskENTER_CRITICAL () __attribute__((weak));
3028
3129// Support nested IRQ disable/re-enable
3230#ifndef maxIRQs
@@ -37,7 +35,7 @@ static uint32_t _irqStack[2][maxIRQs];
3735
3836extern " C" void interrupts () {
3937 if (__freeRTOSinitted) {
40- taskEXIT_CRITICAL ();
38+ __freertos_task_exit_critical ();
4139 } else {
4240 auto core = get_core_num ();
4341 if (!_irqStackTop[core]) {
@@ -50,7 +48,7 @@ extern "C" void interrupts() {
5048
5149extern " C" void noInterrupts () {
5250 if (__freeRTOSinitted) {
53- taskENTER_CRITICAL ();
51+ __freertos_task_enter_critical ();
5452 } else {
5553 auto core = get_core_num ();
5654 if (_irqStackTop[core] == maxIRQs) {
Original file line number Diff line number Diff line change @@ -91,6 +91,14 @@ extern "C" {
9191 bool __freertos_check_if_in_isr () {
9292 return portCHECK_IF_IN_ISR ();
9393 }
94+
95+ void __freertos_task_exit_critical () {
96+ taskEXIT_CRITICAL ();
97+ }
98+
99+ void __freertos_task_enter_critical () {
100+ taskENTER_CRITICAL ();
101+ }
94102}
95103
96104
You can’t perform that action at this time.
0 commit comments