From c5c62e93d3a79e299c24a8436f76acdd6f0b2ffe Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Thu, 27 Aug 2020 11:01:45 +0200 Subject: [PATCH] cpu/esp_common: Declare sched_active_{thread,pid} Declare sched_active_thread and sched_active_pid locally in the ESP code for now. Once the code is cleaned up to no longer tap into scheduler internals but use the API instead, those can be dropped again. --- cpu/esp_common/freertos/task.c | 1 + cpu/esp_common/thread_arch.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cpu/esp_common/freertos/task.c b/cpu/esp_common/freertos/task.c index 5f0be2ecde..78920c7d24 100644 --- a/cpu/esp_common/freertos/task.c +++ b/cpu/esp_common/freertos/task.c @@ -103,6 +103,7 @@ BaseType_t xTaskCreate (TaskFunction_t pvTaskCode, void vTaskDelete (TaskHandle_t xTaskToDelete) { + extern volatile thread_t *sched_active_thread; DEBUG("%s pid=%d task=%p\n", __func__, thread_getpid(), xTaskToDelete); assert(xTaskToDelete != NULL); diff --git a/cpu/esp_common/thread_arch.c b/cpu/esp_common/thread_arch.c index d9929cff9c..cf304d2582 100644 --- a/cpu/esp_common/thread_arch.c +++ b/cpu/esp_common/thread_arch.c @@ -416,6 +416,8 @@ NORETURN void cpu_switch_context_exit(void) */ NORETURN void task_exit(void) { + extern volatile thread_t *sched_active_thread; + extern volatile kernel_pid_t sched_active_pid; DEBUG("sched_task_exit: ending thread %" PRIkernel_pid "...\n", thread_getpid());